final byte readByte() throws DisconnectException { ensureBLayerDataInBuffer(1); adjustLengths(1); return (byte) (buffer_[pos_++] & 0xff); }
final int readUnsignedShort() throws DisconnectException { // should we be checking dss lengths and ddmScalarLengths here // if yes, i am not sure this is the correct place if we should be checking ensureBLayerDataInBuffer(2); adjustLengths(2); return ((buffer_[pos_++] & 0xff) << 8) + ((buffer_[pos_++] & 0xff) << 0); }
final int[] readUnsignedShortList() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); int count = len / 2; int[] list = new int[count]; for (int i = 0; i < count; i++) { list[i] = ((buffer_[pos_++] & 0xff) << 8) + ((buffer_[pos_++] & 0xff) << 0); } return list; }
final void skipBytes(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); pos_ += length; }
final byte readByte() throws DisconnectException { ensureBLayerDataInBuffer(1); adjustLengths(1); return (byte) (buffer_[pos_++] & 0xff); }
final boolean readBoolean() throws DisconnectException { ensureBLayerDataInBuffer(1); adjustLengths(1); return buffer_[pos_++] != 0; }
final String readString(int length, Charset encoding) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); String s = new String(buffer_, pos_, length, encoding); pos_ += length; return s; }
final byte[] readBytes() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); byte[] b = new byte[len]; System.arraycopy(buffer_, pos_, b, 0, len); pos_ += len; return b; }
final void skipBytes() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); pos_ += len; }
final byte[] readBytes(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); byte[] b = new byte[length]; System.arraycopy(buffer_, pos_, b, 0, length); pos_ += length; return b; }
final void skipBytes(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); pos_ += length; }
final void skipBytes() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); pos_ += len; }
final String readString(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); String result = ccsidManager_.convertToUCS2(buffer_, pos_, length); pos_ += length; return result; }
final void readIntArray(int[] array) throws DisconnectException { ensureBLayerDataInBuffer(array.length * 4); adjustLengths(array.length * 4); for (int i = 0; i < array.length; i++) { array[i] = SignedBinary.getInt(buffer_, pos_); pos_ += 4; } }
final long readLong() throws DisconnectException { // should we be checking dss lengths and ddmScalarLengths here ensureBLayerDataInBuffer(8); adjustLengths(8); long l = SignedBinary.getLong(buffer_, pos_); pos_ += 8; return l; }
final short readShort() throws DisconnectException { // should we be checking dss lengths and ddmScalarLengths here ensureBLayerDataInBuffer(2); adjustLengths(2); short s = SignedBinary.getShort(buffer_, pos_); pos_ += 2; return s; }
final int readInt() throws DisconnectException { // should we be checking dss lengths and ddmScalarLengths here ensureBLayerDataInBuffer(4); adjustLengths(4); int i = SignedBinary.getInt(buffer_, pos_); pos_ += 4; return i; }
final short readShort() throws DisconnectException { // should we be checking dss lengths and ddmScalarLengths here ensureBLayerDataInBuffer(2); adjustLengths(2); short s = SignedBinary.getShort(buffer_, pos_); pos_ += 2; return s; }
final int readInt() throws DisconnectException { // should we be checking dss lengths and ddmScalarLengths here ensureBLayerDataInBuffer(4); adjustLengths(4); int i = SignedBinary.getInt(buffer_, pos_); pos_ += 4; return i; }
final String readString() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); String result = ccsidManager_.convertToUCS2(buffer_, pos_, len); pos_ += len; return result; }