Reads bytes stored in an FST.
<init>()getPosition() · also: get_positionGet current read position.
setPosition(long pos) · also: set_positionSet current read position.
Returns a clone of this stream.
Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.
Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.
readByte()Reads and returns a single byte.
readBytes(byte[] b, int offset, int len)Reads a specified number of bytes into an array at the specified offset.
| name | type | description |
|---|---|---|
| b | byte[] | the array to read bytes into |
| offset | int | the offset in the array to start storing bytes |
| len | int | the number of bytes to read |
readBytes(byte[] b, int offset, int len, boolean useBuffer)Reads a specified number of bytes into an array at the specified offset with control over
whether the read should be buffered (callers who have their own buffer should pass in "false"
for useBuffer). Currently only BufferedIndexInput respects this parameter.
| name | type | description |
|---|---|---|
| b | byte[] | the array to read bytes into |
| offset | int | the offset in the array to start storing bytes |
| len | int | the number of bytes to read |
| use_buffer | boolean | set to false if the caller will handle buffering. |
readFloats(float[] floats, int offset, int len)Reads a specified number of floats into an array at the specified offset.
| name | type | description |
|---|---|---|
| floats | float[] | the array to read bytes into |
| offset | int | the offset in the array to start storing floats |
| len | int | the number of floats to read |
readGroupVInt(int[] dst, int offset)GroupVIntUtil#readGroupVInts(DataInput, int[], int) to decode a full group including tails
instead.
Legacy: This method allowed to implement GroupVInt encoding in a more efficient way when this implementation supports random access. It is no longer called by Lucene's code.
If you have implemented this method, simply remove it!
readInt()Reads four bytes and returns an int (LE byte order).
readInts(int[] dst, int offset, int length)Reads a specified number of ints into an array at the specified offset.
| name | type | description |
|---|---|---|
| dst | int[] | the array to read bytes into |
| offset | int | the offset in the array to start storing ints |
| length | int | the number of ints to read |
readLong()Reads eight bytes and returns a long (LE byte order).
readLongs(long[] dst, int offset, int length)Read a specified number of longs.
readMapOfStrings()Reads a Map<String,String> previously written with DataOutput#writeMapOfStrings(Map).
Returns: An immutable map containing the written contents.
readSetOfStrings()Reads a Set<String> previously written with DataOutput#writeSetOfStrings(Set).
Returns: An immutable set containing the written contents.
readShort()Reads two bytes and returns a short (LE byte order).
readString()Reads a string.
readVInt()Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are supported, but should be avoided.
The format is described further in DataOutput#writeVInt(int).
readVLong()Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.
The format is described further in DataOutput#writeVInt(int).
readZInt()Read a zig-zag-encoded variable-length
integer.
readZLong()Read a zig-zag-encoded variable-length
integer. Reads between one and ten bytes.
skipBytes(long numBytes)Skip over numBytes bytes. This method may skip bytes in whatever way is most
optimal, and may not have the same behavior as reading the skipped bytes. In general, negative
numBytes are not supported.