Package org.apache.derby.client.net
Class Reply
- java.lang.Object
-
- org.apache.derby.client.net.Reply
-
- Direct Known Subclasses:
NetConnectionReply
class Reply extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Agentagent_protected byte[]buffer_protected intcount_private intcurrentPos_private int[]ddmCollectionLenStack_private intddmScalarLen_protected static intDEFAULT_BUFFER_SIZEprivate intdssCorrelationID_private booleandssIsChainedWithSameID_private booleandssIsContinued_protected intdssLength_private static intEMPTY_STACK(package private) static intEND_OF_COLLECTION(package private) static intEND_OF_SAME_ID_CHAINprotected booleanensuredLengthForDecryption_protected byte[]longBufferForDecryption_protected intlongCountForDecryption_protected intlongPosForDecryption_protected byte[]longValueForDecryption_private static intMAX_MARKS_NESTINGprotected NetAgentnetAgent_private intpeekedCodePoint_protected intpeekedLength_private intpeekedNumOfExtendedLenBytes_protected intpos_private inttopDdmCollectionStack_
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidadjustCollectionAndDssLengths(int length)protected intadjustDdmLength(int ddmLength, int length)protected voidadjustLengths(int length)private voidcompressBLayerData(int continueDssHeaderCount)private voiddecryptData(int gdsFormatter, int oldDssLength)(package private) voiddoSyntaxrmSemantics(int syntaxErrorCode)protected voidendOfSameIdChainData()private intensureALayerDataInBuffer(int desiredDataSize)protected voidensureBLayerDataInBuffer(int desiredDataSize)private voidensureSpaceInBufferForFill(int desiredSpace)private intfill(int minimumBytesNeeded)(package private) java.io.ByteArrayOutputStreamgetData(java.io.ByteArrayOutputStream existingBuffer)(package private) intgetDdmLength()(package private) java.io.ByteArrayOutputStreamgetFastData(java.io.ByteArrayOutputStream existingBuffer)(package private) intgetFastSkipSQLCARDrowLength()(package private) voidinitialize()(package private) voidmark()protected voidmatchCodePoint(int expectedCodePoint)protected voidparseLengthAndMatchCodePoint(int expectedCodePoint)protected intpeekCodePoint()private voidpeekExtendedLength()protected intpeekFastBytes(byte[] b, int offset, int length)protected intpeekFastLength()protected booleanpeekForNullSqlcagrp()protected intpeekNumOfColumns()protected intpeekTotalColumnCount(int tripletLength)protected voidpopCollectionStack()private intpopMark()protected voidpushLengthOnCollectionStack()(package private) bytereadByte()(package private) byte[]readBytes()(package private) byte[]readBytes(int length)private voidreadDSSContinuationHeader()private voidreadDssHeader()private voidreadExtendedLength()(package private) bytereadFastByte()(package private) byte[]readFastBytes(int length)(package private) intreadFastInt()(package private) voidreadFastIntArray(int[] array)(package private) byte[]readFastLDBytes()(package private) longreadFastLong()(package private) shortreadFastShort()(package private) java.lang.StringreadFastString(int length)(package private) java.lang.StringreadFastString(int length, java.nio.charset.Charset encoding)(package private) intreadFastUnsignedByte()(package private) intreadFastUnsignedShort()(package private) intreadInt()private intreadLengthAndCodePoint()(package private) shortreadShort()(package private) java.lang.StringreadString()(package private) java.lang.StringreadString(int length, java.nio.charset.Charset encoding)(package private) intreadUnsignedByte()(package private) intreadUnsignedShort()(package private) int[]readUnsignedShortList()private voidshiftBuffer(byte[] destinationBuffer)(package private) voidskipBytes()(package private) voidskipBytes(int length)(package private) voidskipFastBytes(int length)private intskipSQLDHROW(int offset)protected voidstartSameIdChainParse()
-
-
-
Field Detail
-
agent_
protected Agent agent_
-
netAgent_
protected NetAgent netAgent_
-
DEFAULT_BUFFER_SIZE
protected static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
buffer_
protected byte[] buffer_
-
pos_
protected int pos_
-
count_
protected int count_
-
topDdmCollectionStack_
private int topDdmCollectionStack_
-
MAX_MARKS_NESTING
private static final int MAX_MARKS_NESTING
- See Also:
- Constant Field Values
-
ddmCollectionLenStack_
private int[] ddmCollectionLenStack_
-
ddmScalarLen_
private int ddmScalarLen_
-
EMPTY_STACK
private static final int EMPTY_STACK
- See Also:
- Constant Field Values
-
ensuredLengthForDecryption_
protected boolean ensuredLengthForDecryption_
-
longBufferForDecryption_
protected byte[] longBufferForDecryption_
-
longPosForDecryption_
protected int longPosForDecryption_
-
longValueForDecryption_
protected byte[] longValueForDecryption_
-
longCountForDecryption_
protected int longCountForDecryption_
-
dssLength_
protected int dssLength_
-
dssIsContinued_
private boolean dssIsContinued_
-
dssIsChainedWithSameID_
private boolean dssIsChainedWithSameID_
-
dssCorrelationID_
private int dssCorrelationID_
-
peekedLength_
protected int peekedLength_
-
peekedCodePoint_
private int peekedCodePoint_
-
peekedNumOfExtendedLenBytes_
private int peekedNumOfExtendedLenBytes_
-
currentPos_
private int currentPos_
-
END_OF_COLLECTION
static final int END_OF_COLLECTION
- See Also:
- Constant Field Values
-
END_OF_SAME_ID_CHAIN
static final int END_OF_SAME_ID_CHAIN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Reply
Reply(NetAgent netAgent, int bufferSize)
-
-
Method Detail
-
initialize
final void initialize()
-
getDdmLength
final int getDdmLength()
-
shiftBuffer
private void shiftBuffer(byte[] destinationBuffer)
-
ensureSpaceInBufferForFill
private void ensureSpaceInBufferForFill(int desiredSpace)
-
fill
private int fill(int minimumBytesNeeded) throws DisconnectException- Throws:
DisconnectException
-
ensureALayerDataInBuffer
private int ensureALayerDataInBuffer(int desiredDataSize) throws DisconnectException- Throws:
DisconnectException
-
ensureBLayerDataInBuffer
protected final void ensureBLayerDataInBuffer(int desiredDataSize) throws DisconnectException- Throws:
DisconnectException
-
compressBLayerData
private void compressBLayerData(int continueDssHeaderCount) throws DisconnectException- Throws:
DisconnectException
-
readDssHeader
private void readDssHeader() throws DisconnectException- Throws:
DisconnectException
-
decryptData
private void decryptData(int gdsFormatter, int oldDssLength) throws DisconnectException- Throws:
DisconnectException
-
readUnsignedShort
final int readUnsignedShort() throws DisconnectException- Throws:
DisconnectException
-
readShort
final short readShort() throws DisconnectException- Throws:
DisconnectException
-
readInt
final int readInt() throws DisconnectException- Throws:
DisconnectException
-
readUnsignedShortList
final int[] readUnsignedShortList() throws DisconnectException- Throws:
DisconnectException
-
readUnsignedByte
final int readUnsignedByte() throws DisconnectException- Throws:
DisconnectException
-
readByte
final byte readByte() throws DisconnectException- Throws:
DisconnectException
-
readString
final java.lang.String readString(int length, java.nio.charset.Charset encoding) throws DisconnectException- Throws:
DisconnectException
-
readString
final java.lang.String readString() throws DisconnectException- Throws:
DisconnectException
-
readBytes
final byte[] readBytes(int length) throws DisconnectException- Throws:
DisconnectException
-
readBytes
final byte[] readBytes() throws DisconnectException- Throws:
DisconnectException
-
skipBytes
final void skipBytes(int length) throws DisconnectException- Throws:
DisconnectException
-
skipBytes
final void skipBytes() throws DisconnectException- Throws:
DisconnectException
-
getData
final java.io.ByteArrayOutputStream getData(java.io.ByteArrayOutputStream existingBuffer) throws DisconnectException- Throws:
DisconnectException
-
readDSSContinuationHeader
private void readDSSContinuationHeader() throws DisconnectException- Throws:
DisconnectException
-
doSyntaxrmSemantics
final void doSyntaxrmSemantics(int syntaxErrorCode) throws DisconnectException- Throws:
DisconnectException
-
pushLengthOnCollectionStack
protected final void pushLengthOnCollectionStack()
-
adjustLengths
protected final void adjustLengths(int length)
-
adjustDdmLength
protected int adjustDdmLength(int ddmLength, int length)
-
popCollectionStack
protected final void popCollectionStack()
-
peekCodePoint
protected final int peekCodePoint() throws DisconnectException- Throws:
DisconnectException
-
peekFastBytes
protected final int peekFastBytes(byte[] b, int offset, int length) throws DisconnectException- Throws:
DisconnectException
-
parseLengthAndMatchCodePoint
protected final void parseLengthAndMatchCodePoint(int expectedCodePoint) throws DisconnectException- Throws:
DisconnectException
-
readLengthAndCodePoint
private int readLengthAndCodePoint() throws DisconnectException- Throws:
DisconnectException
-
readExtendedLength
private void readExtendedLength() throws DisconnectException- Throws:
DisconnectException
-
adjustCollectionAndDssLengths
private void adjustCollectionAndDssLengths(int length)
-
startSameIdChainParse
protected final void startSameIdChainParse() throws DisconnectException- Throws:
DisconnectException
-
endOfSameIdChainData
protected final void endOfSameIdChainData() throws DisconnectException- Throws:
DisconnectException
-
peekTotalColumnCount
protected final int peekTotalColumnCount(int tripletLength) throws DisconnectException- Throws:
DisconnectException
-
peekExtendedLength
private void peekExtendedLength() throws DisconnectException- Throws:
DisconnectException
-
readFastUnsignedByte
final int readFastUnsignedByte() throws DisconnectException- Throws:
DisconnectException
-
readFastShort
final short readFastShort() throws DisconnectException- Throws:
DisconnectException
-
readFastUnsignedShort
final int readFastUnsignedShort() throws DisconnectException- Throws:
DisconnectException
-
readFastInt
final int readFastInt() throws DisconnectException- Throws:
DisconnectException
-
readFastString
final java.lang.String readFastString(int length) throws DisconnectException- Throws:
DisconnectException
-
readFastBytes
final byte[] readFastBytes(int length) throws DisconnectException- Throws:
DisconnectException
-
peekFastLength
protected final int peekFastLength() throws DisconnectException- Throws:
DisconnectException
-
skipFastBytes
final void skipFastBytes(int length) throws DisconnectException- Throws:
DisconnectException
-
readFastIntArray
final void readFastIntArray(int[] array) throws DisconnectException- Throws:
DisconnectException
-
readFastString
final java.lang.String readFastString(int length, java.nio.charset.Charset encoding)
-
readFastLDBytes
final byte[] readFastLDBytes() throws DisconnectException- Throws:
DisconnectException
-
readFastLong
final long readFastLong() throws DisconnectException- Throws:
DisconnectException
-
readFastByte
final byte readFastByte() throws DisconnectException- Throws:
DisconnectException
-
mark
final void mark()
-
popMark
private int popMark()
-
getFastSkipSQLCARDrowLength
final int getFastSkipSQLCARDrowLength()
-
getFastData
final java.io.ByteArrayOutputStream getFastData(java.io.ByteArrayOutputStream existingBuffer) throws DisconnectException- Throws:
DisconnectException
-
matchCodePoint
protected final void matchCodePoint(int expectedCodePoint) throws DisconnectException- Throws:
DisconnectException
-
peekNumOfColumns
protected final int peekNumOfColumns() throws DisconnectException- Throws:
DisconnectException
-
peekForNullSqlcagrp
protected final boolean peekForNullSqlcagrp()
-
skipSQLDHROW
private int skipSQLDHROW(int offset)
-
-