outPacket = OdbcPacketOutputStream.newOdbcPacketOutputStream();
...
// For each packet you need to transmit:
outPacket.reset();
outPacket.write(this);
outPacket.write(that);
outPacket.xmit('X', hsqlDataOutputStream);
| Modifier and Type | Field and Description |
|---|---|
| private ByteArrayOutputStream | |
| private int | |
| private DataOutputStream | |
| private ByteArrayOutputStream |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | close()
Overrides java. Implements java. Closes this output stream and releases any system resources associated with the stream. |
| public int | |
| pack-priv static OdbcPacketOutputStream | |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| public synchronized void | writeByteChar(char c)
The behavior here is purposefully different from java.io.DataOutputStream.writeChar(int), which writes 2 bytes. |
| pack-priv synchronized void | |
| pack-priv synchronized int | xmit(char packetType, DataOutputStream destinationStream)
Returns: packet size (which does not count the type byte). |
| byteArrayOutputStream | back to summary |
|---|---|
| private ByteArrayOutputStream byteArrayOutputStream | |
| packetStart | back to summary |
|---|---|
| private int packetStart | |
| stringWriterDos | back to summary |
|---|---|
| private DataOutputStream stringWriterDos | |
| stringWriterOS | back to summary |
|---|---|
| private ByteArrayOutputStream stringWriterOS | |
| OdbcPacketOutputStream | back to summary |
|---|---|
| protected OdbcPacketOutputStream(ByteArrayOutputStream byteArrayOutputStream) throws IOException | |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources associated with the stream.
| |
| getSize | back to summary |
|---|---|
| public int getSize() | |
| newOdbcPacketOutputStream | back to summary |
|---|---|
| pack-priv static OdbcPacketOutputStream newOdbcPacketOutputStream() throws IOException | |
| reset | back to summary |
|---|---|
| pack-priv synchronized void reset() throws IOException | |
| write | back to summary |
|---|---|
| pack-priv synchronized void write(String s) throws IOException Wrapper method to write a null-terminated String. | |
| write | back to summary |
|---|---|
| pack-priv synchronized void write(String s, boolean nullTerm) throws IOException | |
| writeByteChar | back to summary |
|---|---|
| public synchronized void writeByteChar(char c) throws IOException The behavior here is purposefully different from java.io.DataOutputStream.writeChar(int), which writes 2 bytes. We are supporting only 1-byte characters, or don't care about the high bits. | |
| writeSized | back to summary |
|---|---|
| pack-priv synchronized void writeSized(String s) throws IOException | |
| xmit | back to summary |
|---|---|
pack-priv synchronized int xmit(char packetType, DataOutputStream destinationStream) throws IOException
| |