Inheritance diagram for com::sleepycat::bind::tuple::TupleInput:
Public Member Functions | |
TupleInput (byte[] buffer) | |
TupleInput (byte[] buffer, int offset, int length) | |
TupleInput (TupleOutput output) | |
final String | readString () throws IndexOutOfBoundsException, IllegalArgumentException |
final char | readChar () throws IndexOutOfBoundsException |
final boolean | readBoolean () throws IndexOutOfBoundsException |
final byte | readByte () throws IndexOutOfBoundsException |
final short | readShort () throws IndexOutOfBoundsException |
final int | readInt () throws IndexOutOfBoundsException |
final long | readLong () throws IndexOutOfBoundsException |
final float | readFloat () throws IndexOutOfBoundsException |
final double | readDouble () throws IndexOutOfBoundsException |
final int | readUnsignedByte () throws IndexOutOfBoundsException |
final int | readUnsignedShort () throws IndexOutOfBoundsException |
final long | readUnsignedInt () throws IndexOutOfBoundsException |
final String | readBytes (int length) throws IndexOutOfBoundsException |
final String | readChars (int length) throws IndexOutOfBoundsException |
final void | readBytes (char[] chars) throws IndexOutOfBoundsException |
final void | readChars (char[] chars) throws IndexOutOfBoundsException |
final String | readString (int length) throws IndexOutOfBoundsException, IllegalArgumentException |
final void | readString (char[] chars) throws IndexOutOfBoundsException, IllegalArgumentException |
InputStream
with DataInput
-like methods for reading tuple fields. It is used by TupleBinding
.This class has many methods that have the same signatures as methods in the java.io.DataInput interface. The reason this class does not implement java.io.DataInput is because it would break the interface contract for those methods because of data format differences.
Signed numbers are stored in the buffer in MSB (most significant byte first) order with their sign bit (high-order bit) inverted to cause negative numbers to be sorted first when comparing values as unsigned byte arrays, as done in a database. Unsigned numbers, including characters, are stored in MSB order with no change to their sign bit.
Strings and character arrays are stored either as a fixed length array of unicode characters, where the length must be known by the application, or as a null-terminated UTF byte array.
Floats and doubles are stored in standard Java integer-bit representation (IEEE 754). Non-negative numbers are correctly ordered by numeric value. However, negative numbers are not correctly ordered; therefore, if you use negative floating point numbers in a key, you'll need to implement and configure a custom comparator to get correct numeric ordering.
Definition at line 56 of file TupleInput.java.
|
Creates a tuple input object for reading a byte array of tuple data. A reference to the byte array will be kept by this object (it will not be copied) and therefore the byte array should not be modified while this object is in use.
Definition at line 67 of file TupleInput.java. |
|
Creates a tuple input object for reading a byte array of tuple data at a given offset for a given length. A reference to the byte array will be kept by this object (it will not be copied) and therefore the byte array should not be modified while this object is in use.
Definition at line 85 of file TupleInput.java. |
|
Creates a tuple input object from the data contained in a tuple output object. A reference to the tuple output's byte array will be kept by this object (it will not be copied) and therefore the tuple output object should not be modified while this object is in use.
Definition at line 98 of file TupleInput.java. References com::sleepycat::util::FastOutputStream::getBufferBytes(), com::sleepycat::util::FastOutputStream::getBufferLength(), and com::sleepycat::util::FastOutputStream::getBufferOffset(). |
|
Reads a boolean (one byte) unsigned value from the buffer and returns true if it is non-zero and false if it is zero. Reads values that were written using TupleOutput#writeBoolean.
Definition at line 160 of file TupleInput.java. References com::sleepycat::util::FastInputStream::readFast(). Referenced by com::sleepycat::bind::tuple::BooleanBinding::entryToObject(). |
|
Reads a signed byte (one byte) value from the buffer. Reads values that were written using TupleOutput#writeByte.
Definition at line 178 of file TupleInput.java. References readUnsignedByte(). Referenced by com::sleepycat::bind::tuple::ByteBinding::entryToObject(). |
|
Reads the specified number of bytes from the buffer, converting each unsigned byte value to a character of the resulting array. Reads values that were written using TupleOutput#writeBytes. Only characters with values below 0x100 may be read using this method.
Definition at line 402 of file TupleInput.java. References com::sleepycat::util::FastInputStream::readFast(). |
|
Reads the specified number of bytes from the buffer, converting each unsigned byte value to a character of the resulting string. Reads values that were written using TupleOutput#writeBytes. Only characters with values below 0x100 may be read using this method.
Definition at line 354 of file TupleInput.java. References com::sleepycat::util::FastInputStream::readFast(). |
|
Reads a char (two byte) unsigned value from the buffer. Reads values that were written using TupleOutput#writeChar.
Definition at line 145 of file TupleInput.java. References readUnsignedShort(). Referenced by com::sleepycat::bind::tuple::CharacterBinding::entryToObject(), and readChars(). |
|
Reads the specified number of characters from the buffer, converting each two byte unsigned value to a character of the resulting array. Reads values that were written using TupleOutput#writeChars.
Definition at line 425 of file TupleInput.java. References readChar(). |
|
Reads the specified number of characters from the buffer, converting each two byte unsigned value to a character of the resulting string. Reads values that were written using TupleOutput#writeChars.
Definition at line 380 of file TupleInput.java. References readChar(). |
|
Reads a signed double (eight byte) value from the buffer. Reads values that were written using TupleOutput#writeDouble.
Definition at line 252 of file TupleInput.java. Referenced by com::sleepycat::bind::tuple::DoubleBinding::entryToObject(). |
|
Reads a signed float (four byte) value from the buffer. Reads values that were written using TupleOutput#writeFloat.
Definition at line 236 of file TupleInput.java. References readUnsignedInt(). Referenced by com::sleepycat::bind::tuple::FloatBinding::entryToObject(). |
|
Reads a signed int (four byte) value from the buffer. Reads values that were written using TupleOutput#writeInt.
Definition at line 206 of file TupleInput.java. References readUnsignedInt(). Referenced by com::sleepycat::bind::tuple::IntegerBinding::entryToObject(). |
|
Reads a signed long (eight byte) value from the buffer. Reads values that were written using TupleOutput#writeLong.
Definition at line 220 of file TupleInput.java. Referenced by com::sleepycat::bind::tuple::LongBinding::entryToObject(). |
|
Reads a signed short (two byte) value from the buffer. Reads values that were written using TupleOutput#writeShort.
Definition at line 192 of file TupleInput.java. References readUnsignedShort(). Referenced by com::sleepycat::bind::tuple::ShortBinding::entryToObject(). |
|
Reads the specified number of UTF characters string from the data buffer and converts the data from UTF to Unicode. Reads values that were written using TupleOutput#writeString(char[]).
Definition at line 470 of file TupleInput.java. References com::sleepycat::util::FastInputStream::getBufferBytes(). |
|
Reads the specified number of UTF characters string from the data buffer and converts the data from UTF to Unicode. Reads values that were written using TupleOutput#writeString(char[]).
Definition at line 448 of file TupleInput.java. References readString(). |
|
Reads a null-terminated UTF string from the data buffer and converts the data from UTF to Unicode. Reads values that were written using TupleOutput#writeString(String).
Definition at line 119 of file TupleInput.java. References com::sleepycat::util::FastInputStream::getBufferBytes(), and com::sleepycat::util::FastInputStream::getBufferOffset(). Referenced by com::sleepycat::bind::tuple::StringBinding::entryToObject(), readString(), collections::ship::marshal::SupplierKey::unmarshalKey(), collections::ship::marshal::ShipmentKey::unmarshalKey(), collections::ship::marshal::PartKey::unmarshalKey(), collections::ship::marshal::Supplier::unmarshalPrimaryKey(), collections::ship::marshal::Shipment::unmarshalPrimaryKey(), and collections::ship::marshal::Part::unmarshalPrimaryKey(). |
|
Reads an unsigned byte (one byte) value from the buffer. Reads values that were written using TupleOutput#writeUnsignedByte.
Definition at line 267 of file TupleInput.java. References com::sleepycat::util::FastInputStream::readFast(). Referenced by readByte(). |
|
Reads an unsigned int (four byte) value from the buffer. Reads values that were written using TupleOutput#writeUnsignedInt.
Definition at line 308 of file TupleInput.java. References com::sleepycat::util::FastInputStream::readFast(). Referenced by readFloat(), and readInt(). |
|
Reads an unsigned short (two byte) value from the buffer. Reads values that were written using TupleOutput#writeUnsignedShort.
Definition at line 286 of file TupleInput.java. References com::sleepycat::util::FastInputStream::readFast(). Referenced by readChar(), and readShort(). |