| Modifier and Type | Field and Description |
|---|---|
| protected ByteBuffer | |
| private int | |
| private int | |
| private int[] | |
| private static final int | |
| protected NetAgent | |
| protected boolean | |
| protected int | |
| protected int | |
| private boolean | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private final void | buildDss(boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss)
|
| private void | buildLengthAndCodePointForLob(int codePoint, long leftToRead, boolean writeNullByte, int extendedLengthByteCount)
|
| private void | |
| pack-priv final void | |
| private final int | |
| private final void | |
| protected final void | |
| pack-priv final void | |
| pack-priv final void | |
| private final boolean | |
| private int | Returns: the number of bytes in the encoded representation of the stringthe string to encode string)Encode a string and put it into the buffer. |
| private final void | |
| private final void | |
| private final void | |
| protected void | |
| private final void | |
| private final int | |
| private final int | |
| pack-priv final void | |
| private final void | |
| protected final void | |
| protected final void | |
| private final void | |
| private final void | |
| private final void | padScalarStreamForError(long
total number of bytes left to read leftToRead, int remaining bytes to read before flushing bytesToRead, boolean whether or not to wrote the Derby-specific trailing
EXTDTA status flag (see DRDAConstants) writeStatus, byte the EXTDTA status (for this data value), ignored if
status)writeStatus is falsePads a value with zeros until it has reached its defined length. |
| private static boolean | |
| private final int | |
| protected final int | |
| private final int | prepScalarStream(boolean chained, boolean chainedWithSameCorrelator, boolean writeNullByte, long leftToRead)
|
| private void | |
| public void | |
| public void | |
| protected final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| private void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| protected void | |
| private void | writeEXTDTAStatus(byte
the Derby-specific EXTDTA status flag flag)Writes the Derby-specific EXTDTA status flag to the send buffer. |
| private final void | |
| protected void | |
| pack-priv void | |
| protected void | |
| pack-priv final void | |
| private final void | |
| private final void | |
| pack-priv final void | |
| private void | |
| pack-priv final void | writeLidAndLengths(int[][] lidAndLengthOverrides, int count, int offset, boolean mddRequired, Hashtable<K, V> map)
|
| pack-priv final void | |
| pack-priv final void | |
| protected void | |
| private final void | writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, long
the byte length of the stream length, InputStream the stream to transfer in, boolean whether or not to write a NULL indicator writeNullByte, int one-based parameter index parameterIndex)Writes a stream with a known length onto the wire. |
| private final void | writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, InputStream
the stream to transfer in, boolean whether or not to write a NULL indicator writeNullByte, int one-based parameter index parameterIndex)Writes a stream with unknown length onto the wire. |
| protected final void | |
| pack-priv final void | |
| protected final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, InputStream in, boolean writeNullByte, int parameterIndex)
|
| pack-priv final void | writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, long length, InputStream in, boolean writeNullByte, int parameterIndex)
|
| pack-priv final void | writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, Reader r, boolean writeNullByte, int parameterIndex)
|
| pack-priv final void | writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, Reader r, boolean writeNullByte, int parameterIndex)
|
| pack-priv final void | writeScalarString(int
codepoint to write codePoint, String value to write string)Write string with no minimum or maximum limit. |
| pack-priv final void | writeScalarString(int
codepoint to write codePoint, String value string, int minimum length. String will be padded with spaces
if value is too short. Assumes space character is one byte. byteMinLength, int Limit to string length. SQLException will be
thrown if we exceed this limit. byteLengthLimit, String SQLState to throw with string as param if byteLengthLimit
is exceeded. sqlState)insert a 4 byte length/codepoint pair plus ddm character data into the buffer. |
| pack-priv final void | |
| protected void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final void |
| buffer | back to summary |
|---|---|
| protected ByteBuffer buffer | |
| correlationID_ | back to summary |
|---|---|
| private int correlationID_ | |
| dssLengthLocation_ | back to summary |
|---|---|
| private int dssLengthLocation_ | |
| markStack_ | back to summary |
|---|---|
| private int[] markStack_ | |
| MAX_MARKS_NESTING | back to summary |
|---|---|
| private static final int MAX_MARKS_NESTING | |
| netAgent_ | back to summary |
|---|---|
| protected NetAgent netAgent_ | |
| passwordIncluded_ | back to summary |
|---|---|
| protected boolean passwordIncluded_ | |
| passwordLength_ | back to summary |
|---|---|
| protected int passwordLength_ | |
| passwordStart_ | back to summary |
|---|---|
| protected int passwordStart_ | |
| simpleDssFinalize | back to summary |
|---|---|
| private boolean simpleDssFinalize | |
| top_ | back to summary |
|---|---|
| private int top_ | |
| Request | back to summary |
|---|---|
| pack-priv Request(NetAgent netAgent, int minSize) | |
| buildDss | back to summary |
|---|---|
| private final void buildDss(boolean dssHasSameCorrelator, boolean chainedToNextStructure, boolean nextHasSameCorrelator, int dssType, int corrId, boolean simpleFinalizeBuildingNextDss) | |
| buildLengthAndCodePointForLob | back to summary |
|---|---|
| private void buildLengthAndCodePointForLob(int codePoint, long leftToRead, boolean writeNullByte, int extendedLengthByteCount) throws DisconnectException | |
| buildLengthAndCodePointForLob | back to summary |
|---|---|
| private void buildLengthAndCodePointForLob(int codePoint, boolean writeNullByte) throws DisconnectException | |
| buildTripletHeader | back to summary |
|---|---|
| pack-priv final void buildTripletHeader(int tripletLength, int tripletType, int tripletId) | |
| calculateExtendedLengthByteCount | back to summary |
|---|---|
| private final int calculateExtendedLengthByteCount(long ddmSize) | |
| clearBuffer | back to summary |
|---|---|
| private final void clearBuffer() | |
| createCommand | back to summary |
|---|---|
| protected final void createCommand() | |
| createCommandData | back to summary |
|---|---|
| pack-priv final void createCommandData() | |
| createEncryptedCommandData | back to summary |
|---|---|
| pack-priv final void createEncryptedCommandData() | |
| doesRequestContainData | back to summary |
|---|---|
| private final boolean doesRequestContainData() | |
| encodeString | back to summary |
|---|---|
| private int encodeString(String string) throws SqlException Encode a string and put it into the buffer. A larger buffer will be allocated if the current buffer is too small to hold the entire string.
| |
| ensureLength | back to summary |
|---|---|
| private final void ensureLength(int length) | |
| finalizeDssLength | back to summary |
|---|---|
| private final void finalizeDssLength() Signal the completion of a DSS Layer A object.
The length of the DSS object will be calculated based on the difference
between the start of the DSS, saved in the variable
In the event the length requires the use of continuation DSS headers, one for each 32k chunk of data, the data will be shifted and the continuation headers will be inserted with the correct values as needed. Note In the future, we may try to optimize this approach in an attempt to avoid these shifts. | |
| finalizePreviousChainedDss | back to summary |
|---|---|
| private final void finalizePreviousChainedDss(boolean dssHasSameCorrelator) | |
| flush | back to summary |
|---|---|
| protected void flush(OutputStream socketOutputStream) throws IOException | |
| flushExistingDSS | back to summary |
|---|---|
| private final void flushExistingDSS() throws DisconnectException | |
| flushScalarStreamSegment | back to summary |
|---|---|
| private final int flushScalarStreamSegment(long leftToRead, int bytesToRead) throws DisconnectException | |
| flushScalarStreamSegment | back to summary |
|---|---|
| private final int flushScalarStreamSegment() throws DisconnectException | |
| initialize | back to summary |
|---|---|
| pack-priv final void initialize() | |
| mark | back to summary |
|---|---|
| private final void mark() | |
| markForCachingPKGNAMCSN | back to summary |
|---|---|
| protected final void markForCachingPKGNAMCSN() | |
| markLengthBytes | back to summary |
|---|---|
| protected final void markLengthBytes(int codePoint) | |
| maskOutPassword | back to summary |
|---|---|
| private final void maskOutPassword() | |
| padBytes | back to summary |
|---|---|
| private final void padBytes(byte padByte, int length) | |
| padScalarStreamForError | back to summary |
|---|---|
| private final void padScalarStreamForError(long leftToRead, int bytesToRead, boolean writeStatus, byte status) throws DisconnectException Pads a value with zeros until it has reached its defined length. This functionality was introduced to handle the error situation where the actual length of the user stream is shorter than specified. To avoid DRDA protocol errors (or in this case a hang), we have to pad the data until the specified length has been reached. In a later increment the Derby-specific EXTDTA status flag was introduced to allow the client to inform the server that the value sent is invalid.
| |
| peekStream | back to summary |
|---|---|
| private static boolean peekStream(BufferedInputStream in) throws IOException | |
| popMark | back to summary |
|---|---|
| private final int popMark() | |
| popMarkForCachingPKGNAMCSN | back to summary |
|---|---|
| protected final int popMarkForCachingPKGNAMCSN() | |
| prepScalarStream | back to summary |
|---|---|
| private final int prepScalarStream(boolean chained, boolean chainedWithSameCorrelator, boolean writeNullByte, long leftToRead) throws DisconnectException | |
| sendBytes | back to summary |
|---|---|
| private void sendBytes(OutputStream socketOutputStream) throws IOException | |
| setCorrelationID | back to summary |
|---|---|
| public void setCorrelationID(int id) | |
| setDssLengthLocation | back to summary |
|---|---|
| public void setDssLengthLocation(int location) | |
| updateLengthBytes | back to summary |
|---|---|
| protected final void updateLengthBytes() throws SqlException | |
| write1Byte | back to summary |
|---|---|
| pack-priv final void write1Byte(int value) | |
| write2Bytes | back to summary |
|---|---|
| pack-priv final void write2Bytes(int value) | |
| write4Bytes | back to summary |
|---|---|
| pack-priv final void write4Bytes(long value) | |
| writeBigDecimal | back to summary |
|---|---|
| pack-priv final void writeBigDecimal(BigDecimal v, int declaredPrecision, int declaredScale) throws SqlException | |
| writeBoolean | back to summary |
|---|---|
| pack-priv final void writeBoolean(boolean v) | |
| writeByte | back to summary |
|---|---|
| private void writeByte(byte v) | |
| writeBytes | back to summary |
|---|---|
| pack-priv final void writeBytes(byte[] buf, int length) | |
| writeBytes | back to summary |
|---|---|
| pack-priv final void writeBytes(byte[] buf) | |
| writeCodePoint4Bytes | back to summary |
|---|---|
| pack-priv final void writeCodePoint4Bytes(int codePoint, int value) | |
| writeDate | back to summary |
|---|---|
| pack-priv final void writeDate(DateTimeValue date) throws SqlException | |
| writeDouble | back to summary |
|---|---|
| protected void writeDouble(double v) | |
| writeEXTDTAStatus | back to summary |
|---|---|
| private void writeEXTDTAStatus(byte flag) throws DisconnectException Writes the Derby-specific EXTDTA status flag to the send buffer. The existing buffer is flushed to make space for the flag if required.
| |
| writeExtendedLengthBytes | back to summary |
|---|---|
| private final void writeExtendedLengthBytes(int extendedLengthByteCount, long length) | |
| writeFloat | back to summary |
|---|---|
| protected void writeFloat(float v) | |
| writeInt | back to summary |
|---|---|
| pack-priv void writeInt(int v) | |
| writeIntFdocaData | back to summary |
|---|---|
| protected void writeIntFdocaData(int v) | |
| writeLDBytes | back to summary |
|---|---|
| pack-priv final void writeLDBytes(byte[] bytes) | |
| writeLDBytesX | back to summary |
|---|---|
| private final void writeLDBytesX(int ldSize, byte[] bytes) | |
| writeLDBytesXSubset | back to summary |
|---|---|
| private final void writeLDBytesXSubset(int ldSize, int bytesToCopy, byte[] bytes) | |
| writeLengthCodePoint | back to summary |
|---|---|
| pack-priv final void writeLengthCodePoint(int length, int codePoint) | |
| writeLidAndLengths | back to summary |
|---|---|
| private void writeLidAndLengths(int[][] lidAndLengthOverrides, int count, int offset) | |
| writeLidAndLengths | back to summary |
|---|---|
| pack-priv final void writeLidAndLengths(int[][] lidAndLengthOverrides, int count, int offset, boolean mddRequired, Hashtable<K, V> map) | |
| writeLong | back to summary |
|---|---|
| pack-priv final void writeLong(long v) | |
| writeLong6Bytes | back to summary |
|---|---|
| pack-priv final void writeLong6Bytes(long v) Writes a long into the buffer, using six bytes.
| |
| writeLongFdocaData | back to summary |
|---|---|
| protected void writeLongFdocaData(long v) | |
| writePlainScalarStream | back to summary |
|---|---|
| private final void writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, long length, InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException Writes a stream with a known length onto the wire. To avoid DRDA protocol exceptions, the data is truncated or padded as required to complete the transfer. This can be avoided by implementing the request abort mechanism specified by DRDA, but it is rather complex and may not be worth the trouble. Also note that any exceptions generated while writing the stream will be accumulated and raised at a later time.
| |
| writePlainScalarStream | back to summary |
|---|---|
| private final void writePlainScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException Writes a stream with unknown length onto the wire. To avoid DRDA protocol exceptions, the data is truncated or padded as required to complete the transfer. This can be avoided by implementing the request abort mechanism specified by DRDA, but it is rather complex and may not be worth the trouble. Also note that any exceptions generated while writing the stream will be accumulated and raised at a later time. Implementation Note This method does not support sending values with a specified length using layer B streaming and at the same time applying length checking. For large values layer B streaming may be more efficient than using layer A streaming.
| |
| writeScalar1Byte | back to summary |
|---|---|
| protected final void writeScalar1Byte(int codePoint, int value) | |
| writeScalar2Bytes | back to summary |
|---|---|
| pack-priv final void writeScalar2Bytes(int codePoint, int value) | |
| writeScalar4Bytes | back to summary |
|---|---|
| protected final void writeScalar4Bytes(int codePoint, long value) | |
| writeScalar8Bytes | back to summary |
|---|---|
| pack-priv final void writeScalar8Bytes(int codePoint, long value) | |
| writeScalarBytes | back to summary |
|---|---|
| pack-priv final void writeScalarBytes(int codePoint, byte[] buff) | |
| writeScalarBytes | back to summary |
|---|---|
| pack-priv final void writeScalarBytes(int codePoint, byte[] buff, int start, int length) | |
| writeScalarPaddedBytes | back to summary |
|---|---|
| pack-priv final void writeScalarPaddedBytes(byte[] buff, int paddedLength, byte padByte) | |
| writeScalarStream | back to summary |
|---|---|
| pack-priv final void writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException | |
| writeScalarStream | back to summary |
|---|---|
| pack-priv final void writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, long length, InputStream in, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException | |
| writeScalarStream | back to summary |
|---|---|
| pack-priv final void writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, int length, Reader r, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException | |
| writeScalarStream | back to summary |
|---|---|
| pack-priv final void writeScalarStream(boolean chained, boolean chainedWithSameCorrelator, int codePoint, Reader r, boolean writeNullByte, int parameterIndex) throws DisconnectException, SqlException | |
| writeScalarString | back to summary |
|---|---|
| pack-priv final void writeScalarString(int codePoint, String string) throws SqlException Write string with no minimum or maximum limit.
| |
| writeScalarString | back to summary |
|---|---|
| pack-priv final void writeScalarString(int codePoint, String string, int byteMinLength, int byteLengthLimit, String sqlState) throws SqlException insert a 4 byte length/codepoint pair plus ddm character data into the buffer. This method assumes that the String argument can be converted by the ccsid manager. This should be fine because usually there are restrictions on the characters which can be used for ddm character data. The two byte length field will contain the length of the character data and the length of the 4 byte llcp. This method does not handle scenarios which require extended length bytes.
| |
| writeShort | back to summary |
|---|---|
| pack-priv final void writeShort(short v) | |
| writeShortFdocaData | back to summary |
|---|---|
| protected void writeShortFdocaData(short v) | |
| writeSingleorMixedCcsidLDString | back to summary |
|---|---|
| pack-priv final void writeSingleorMixedCcsidLDString(String s, Charset encoding) throws SqlException | |
| writeTime | back to summary |
|---|---|
| pack-priv final void writeTime(DateTimeValue time) | |
| writeTimestamp | back to summary |
|---|---|
| pack-priv final void writeTimestamp(DateTimeValue timestamp) throws SqlException | |
| writeUDT | back to summary |
|---|---|
| pack-priv final void writeUDT(Object val) throws SqlException | |