Date: Friday, February 24, 2006 @ 18:26:25
Author: gilles
Path: /cvsroot/carob/carob
Modified: include/DriverSocket.hpp (1.13 -> 1.14) src/DriverSocket.cpp
(1.17 -> 1.18)
Added reader and writer for byte arrays
--------------------------+
include/DriverSocket.hpp | 15 +++++++++++++--
src/DriverSocket.cpp | 12 ++++++++++++
2 files changed, 25 insertions(+), 2 deletions(-)
Index: carob/include/DriverSocket.hpp
diff -u carob/include/DriverSocket.hpp:1.13 carob/include/DriverSocket.hpp:1.14
--- carob/include/DriverSocket.hpp:1.13 Thu Feb 23 12:09:56 2006
+++ carob/include/DriverSocket.hpp Fri Feb 24 18:26:25 2006
@@ -1,6 +1,6 @@
/*
* Sequoia: Database clustering technology.
- * Copyright (C) 2005 Emic Networks
+ * Copyright (C) 2005-2006 Continuent, Inc.
* Contact: [EMAIL PROTECTED]
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -102,7 +102,18 @@
*/
const DriverSocket & operator>>(bool& i) const
throw (SocketIOException, UnexpectedException);
-
+ /**
+ * Reads given number of bytes from the socket into the given array
+ * @throws SocketIOException
+ */
+ void readBytes(int32_t length, java_byte* data) const
+ throw (SocketIOException, UnexpectedException);
+ /**
+ * Writes given number of bytes from the socket
+ * @throws SocketIOException
+ */
+ void writeBytes(int32_t length, java_byte* data) const
+ throw (SocketIOException, UnexpectedException);
};
} //namespace CarobNS
Index: carob/src/DriverSocket.cpp
diff -u carob/src/DriverSocket.cpp:1.17 carob/src/DriverSocket.cpp:1.18
--- carob/src/DriverSocket.cpp:1.17 Thu Feb 23 12:09:56 2006
+++ carob/src/DriverSocket.cpp Fri Feb 24 18:26:25 2006
@@ -127,3 +127,15 @@
readJavaBool(b);
return *this;
}
+
+void DriverSocket::readBytes(int32_t length, java_byte* data) const
+ throw (SocketIOException, UnexpectedException)
+{
+ readJavaBytes(length, data);
+}
+
+void DriverSocket::writeBytes(int32_t length, java_byte* data) const
+ throw (SocketIOException, UnexpectedException)
+{
+ writeJavaBytes(length, data);
+}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits