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 Agent
agent_
protected byte[]
buffer_
protected int
count_
private int
currentPos_
private int[]
ddmCollectionLenStack_
private int
ddmScalarLen_
protected static int
DEFAULT_BUFFER_SIZE
private int
dssCorrelationID_
private boolean
dssIsChainedWithSameID_
private boolean
dssIsContinued_
protected int
dssLength_
private static int
EMPTY_STACK
(package private) static int
END_OF_COLLECTION
(package private) static int
END_OF_SAME_ID_CHAIN
protected boolean
ensuredLengthForDecryption_
protected byte[]
longBufferForDecryption_
protected int
longCountForDecryption_
protected int
longPosForDecryption_
protected byte[]
longValueForDecryption_
private static int
MAX_MARKS_NESTING
protected NetAgent
netAgent_
private int
peekedCodePoint_
protected int
peekedLength_
private int
peekedNumOfExtendedLenBytes_
protected int
pos_
private int
topDdmCollectionStack_
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
adjustCollectionAndDssLengths(int length)
protected int
adjustDdmLength(int ddmLength, int length)
protected void
adjustLengths(int length)
private void
compressBLayerData(int continueDssHeaderCount)
private void
decryptData(int gdsFormatter, int oldDssLength)
(package private) void
doSyntaxrmSemantics(int syntaxErrorCode)
protected void
endOfSameIdChainData()
private int
ensureALayerDataInBuffer(int desiredDataSize)
protected void
ensureBLayerDataInBuffer(int desiredDataSize)
private void
ensureSpaceInBufferForFill(int desiredSpace)
private int
fill(int minimumBytesNeeded)
(package private) java.io.ByteArrayOutputStream
getData(java.io.ByteArrayOutputStream existingBuffer)
(package private) int
getDdmLength()
(package private) java.io.ByteArrayOutputStream
getFastData(java.io.ByteArrayOutputStream existingBuffer)
(package private) int
getFastSkipSQLCARDrowLength()
(package private) void
initialize()
(package private) void
mark()
protected void
matchCodePoint(int expectedCodePoint)
protected void
parseLengthAndMatchCodePoint(int expectedCodePoint)
protected int
peekCodePoint()
private void
peekExtendedLength()
protected int
peekFastBytes(byte[] b, int offset, int length)
protected int
peekFastLength()
protected boolean
peekForNullSqlcagrp()
protected int
peekNumOfColumns()
protected int
peekTotalColumnCount(int tripletLength)
protected void
popCollectionStack()
private int
popMark()
protected void
pushLengthOnCollectionStack()
(package private) byte
readByte()
(package private) byte[]
readBytes()
(package private) byte[]
readBytes(int length)
private void
readDSSContinuationHeader()
private void
readDssHeader()
private void
readExtendedLength()
(package private) byte
readFastByte()
(package private) byte[]
readFastBytes(int length)
(package private) int
readFastInt()
(package private) void
readFastIntArray(int[] array)
(package private) byte[]
readFastLDBytes()
(package private) long
readFastLong()
(package private) short
readFastShort()
(package private) java.lang.String
readFastString(int length)
(package private) java.lang.String
readFastString(int length, java.nio.charset.Charset encoding)
(package private) int
readFastUnsignedByte()
(package private) int
readFastUnsignedShort()
(package private) int
readInt()
private int
readLengthAndCodePoint()
(package private) short
readShort()
(package private) java.lang.String
readString()
(package private) java.lang.String
readString(int length, java.nio.charset.Charset encoding)
(package private) int
readUnsignedByte()
(package private) int
readUnsignedShort()
(package private) int[]
readUnsignedShortList()
private void
shiftBuffer(byte[] destinationBuffer)
(package private) void
skipBytes()
(package private) void
skipBytes(int length)
(package private) void
skipFastBytes(int length)
private int
skipSQLDHROW(int offset)
protected void
startSameIdChainParse()
-
-
-
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)
-
-