java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.index.ByteSliceReader
- All Implemented Interfaces:
Cloneable
IndexInput that knows how to read the byte slices written by Posting and PostingVector. We read
the bytes in each slice until we hit the end of that slice at which point we read the forwarding
address of the next slice and then jump to it.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[]
int
(package private) int
int
(package private) int
(package private) int
(package private) ByteBlockPool
int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
eof()
void
init
(ByteBlockPool pool, int startIndex, int endIndex) void
byte
readByte()
Reads and returns a single byte.void
readBytes
(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.void
skipBytes
(long numBytes) Skip overnumBytes
bytes.long
writeTo
(DataOutput out) Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readFloats, readInt, readInts, readLong, readLongs, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong
-
Field Details
-
pool
ByteBlockPool pool -
bufferUpto
int bufferUpto -
buffer
byte[] buffer -
upto
public int upto -
limit
int limit -
level
int level -
bufferOffset
public int bufferOffset -
endIndex
public int endIndex
-
-
Constructor Details
-
ByteSliceReader
ByteSliceReader()
-
-
Method Details
-
init
-
eof
public boolean eof() -
readByte
public byte readByte()Description copied from class:DataInput
Reads and returns a single byte. -
writeTo
- Throws:
IOException
-
nextSlice
public void nextSlice() -
readBytes
public void readBytes(byte[] b, int offset, int len) Description copied from class:DataInput
Reads a specified number of bytes into an array at the specified offset. -
skipBytes
public void skipBytes(long numBytes) Description copied from class:DataInput
Skip overnumBytes
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, negativenumBytes
are not supported.
-