Package org.apache.lucene.index
Class ByteSliceReader
- java.lang.Object
-
- org.apache.lucene.store.DataInput
-
- org.apache.lucene.index.ByteSliceReader
-
- All Implemented Interfaces:
java.lang.Cloneable
final class ByteSliceReader extends DataInput
-
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[]bufferintbufferOffset(package private) intbufferUptointendIndex(package private) intlevel(package private) intlimit(package private) ByteBlockPoolpoolintupto
-
Constructor Summary
Constructors Constructor Description ByteSliceReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaneof()voidinit(ByteBlockPool pool, int startIndex, int endIndex)voidnextSlice()bytereadByte()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.longwriteTo(DataOutput out)-
Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readInt, readLELongs, readLong, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong, skipBytes
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
init
public void init(ByteBlockPool pool, int startIndex, int endIndex)
-
eof
public boolean eof()
-
readByte
public byte readByte()
Description copied from class:DataInputReads and returns a single byte.- Specified by:
readBytein classDataInput- See Also:
DataOutput.writeByte(byte)
-
writeTo
public long writeTo(DataOutput out) throws java.io.IOException
- Throws:
java.io.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.- Specified by:
readBytesin classDataInput- Parameters:
b- the array to read bytes intooffset- the offset in the array to start storing byteslen- the number of bytes to read- See Also:
DataOutput.writeBytes(byte[],int)
-
-