protected final void adjustLengths(int length) { ddmScalarLen_ -= length; adjustCollectionAndDssLengths(length); /* for (int i = 0; i <= topDdmCollectionStack_; i++) { ddmCollectionLenStack_[i] -= length; } dssLength_ -= length; */ }
protected final void adjustLengths(int length) { ddmScalarLen_ -= length; adjustCollectionAndDssLengths(length); /* for (int i = 0; i <= topDdmCollectionStack_; i++) { ddmCollectionLenStack_[i] -= length; } dssLength_ -= length; */ }
private final void readExtendedLength() throws DisconnectException { int numberOfExtendedLenBytes = (ddmScalarLen_ - 0x8000); // fix scroll problem was - 4 int adjustSize = 0; switch (numberOfExtendedLenBytes) { case 4: ensureBLayerDataInBuffer(4); ddmScalarLen_ = ((buffer_[pos_++] & 0xff) << 24) + ((buffer_[pos_++] & 0xff) << 16) + ((buffer_[pos_++] & 0xff) << 8) + ((buffer_[pos_++] & 0xff) << 0); adjustSize = 4; break; case 0: ddmScalarLen_ = -1; adjustSize = 0; break; default: doSyntaxrmSemantics(CodePoint.SYNERRCD_INCORRECT_EXTENDED_LEN); } adjustCollectionAndDssLengths(adjustSize); /* // adjust the lengths here. this is a special case since the // extended length bytes do not include their own length. for (int i = 0; i <= topDdmCollectionStack_; i++) { ddmCollectionLenStack_[i] -= adjustSize; } dssLength_ -= adjustSize; */ }
private final void readExtendedLength() throws DisconnectException { int numberOfExtendedLenBytes = (ddmScalarLen_ - 0x8000); // fix scroll problem was - 4 int adjustSize = 0; switch (numberOfExtendedLenBytes) { case 4: ensureBLayerDataInBuffer(4); ddmScalarLen_ = ((buffer_[pos_++] & 0xff) << 24) + ((buffer_[pos_++] & 0xff) << 16) + ((buffer_[pos_++] & 0xff) << 8) + ((buffer_[pos_++] & 0xff) << 0); adjustSize = 4; break; case 0: ddmScalarLen_ = -1; adjustSize = 0; break; default: doSyntaxrmSemantics(CodePoint.SYNERRCD_INCORRECT_EXTENDED_LEN); } adjustCollectionAndDssLengths(adjustSize); /* // adjust the lengths here. this is a special case since the // extended length bytes do not include their own length. for (int i = 0; i <= topDdmCollectionStack_; i++) { ddmCollectionLenStack_[i] -= adjustSize; } dssLength_ -= adjustSize; */ }
protected final void parseLengthAndMatchCodePoint(int expectedCodePoint) throws DisconnectException { int actualCodePoint = 0; if (peekedCodePoint_ == END_OF_COLLECTION) { actualCodePoint = readLengthAndCodePoint(); } else { actualCodePoint = peekedCodePoint_; pos_ += (4 + peekedNumOfExtendedLenBytes_); ddmScalarLen_ = peekedLength_; if (peekedNumOfExtendedLenBytes_ == 0 && ddmScalarLen_ != -1) { adjustLengths(4); } else { adjustCollectionAndDssLengths(4 + peekedNumOfExtendedLenBytes_); } peekedLength_ = 0; peekedCodePoint_ = END_OF_COLLECTION; peekedNumOfExtendedLenBytes_ = 0; } if (actualCodePoint != expectedCodePoint) { agent_.accumulateChainBreakingReadExceptionAndThrow( new DisconnectException(agent_, new ClientMessageId(SQLState.NET_NOT_EXPECTED_CODEPOINT), new Integer(actualCodePoint), new Integer(expectedCodePoint))); } }
protected final void parseLengthAndMatchCodePoint(int expectedCodePoint) throws DisconnectException { int actualCodePoint = 0; if (peekedCodePoint_ == END_OF_COLLECTION) { actualCodePoint = readLengthAndCodePoint(); } else { actualCodePoint = peekedCodePoint_; pos_ += (4 + peekedNumOfExtendedLenBytes_); ddmScalarLen_ = peekedLength_; if (peekedNumOfExtendedLenBytes_ == 0 && ddmScalarLen_ != -1) { adjustLengths(4); } else { adjustCollectionAndDssLengths(4 + peekedNumOfExtendedLenBytes_); } peekedLength_ = 0; peekedCodePoint_ = END_OF_COLLECTION; peekedNumOfExtendedLenBytes_ = 0; } if (actualCodePoint != expectedCodePoint) { agent_.accumulateChainBreakingReadExceptionAndThrow( new DisconnectException(agent_, new ClientMessageId(SQLState.NET_NOT_EXPECTED_CODEPOINT), new Integer(actualCodePoint), new Integer(expectedCodePoint))); } }