public class BufferedChecksumIndexInput extends ChecksumIndexInput
ChecksumIndexInput that wraps
another input and delegates calls.| Constructor and Description |
|---|
BufferedChecksumIndexInput(IndexInput main)
Creates a new BufferedChecksumIndexInput
|
| Modifier and Type | Method and Description |
|---|---|
IndexInput |
clone()
Returns a clone of this stream.
|
void |
close()
Closes the stream to further operations.
|
long |
getChecksum()
Returns the current checksum value
|
long |
getFilePointer()
Returns the current position in this file, where the next read will
occur.
|
long |
length()
The number of bytes in the file.
|
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.
|
IndexInput |
slice(String sliceDescription,
long offset,
long length)
Creates a slice of this index input, with the given description, offset, and length.
|
seekgetFullSliceDescription, randomAccessSlice, toStringreadBytes, readInt, readLong, readMapOfStrings, readSetOfStrings, readShort, readString, readStringSet, readStringStringMap, readVInt, readVLong, readZInt, readZLong, skipBytespublic BufferedChecksumIndexInput(IndexInput main)
public byte readByte()
throws IOException
DataInputreadByte in class DataInputIOExceptionDataOutput.writeByte(byte)public void readBytes(byte[] b,
int offset,
int len)
throws IOException
DataInputreadBytes in class DataInputb - the array to read bytes intooffset - the offset in the array to start storing byteslen - the number of bytes to readIOExceptionDataOutput.writeBytes(byte[],int)public long getChecksum()
ChecksumIndexInputgetChecksum in class ChecksumIndexInputpublic void close()
throws IOException
IndexInputclose in interface Closeableclose in interface AutoCloseableclose in class IndexInputIOExceptionpublic long getFilePointer()
IndexInputgetFilePointer in class IndexInputIndexInput.seek(long)public long length()
IndexInputlength in class IndexInputpublic IndexInput clone()
IndexInputClones 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.
Warning: Lucene never closes cloned
IndexInputs, it will only call IndexInput.close() on the original object.
If you access the cloned IndexInput after closing the original object,
any readXXX methods will throw AlreadyClosedException.
This method is NOT thread safe, so if the current IndexInput
is being used by one thread while clone is called by another,
disaster could strike.
clone in class IndexInputpublic IndexInput slice(String sliceDescription, long offset, long length) throws IOException
IndexInputslice in class IndexInputIOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.