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) intint(package private) int(package private) int(package private) ByteBlockPoolint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneof()voidinit(ByteBlockPool pool, int startIndex, int endIndex) voidbytereadByte()Reads and returns a single byte.voidreadBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.voidskipBytes(long numBytes) Skip overnumBytesbytes.longwriteTo(DataOutput out) Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readFloats, readGroupVInt, readGroupVInts, 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:DataInputReads 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:DataInputReads a specified number of bytes into an array at the specified offset. -
skipBytes
public void skipBytes(long numBytes) Description copied from class:DataInputSkip overnumBytesbytes. 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, negativenumBytesare not supported.
-