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(java.lang.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, readVInt, readVLong, readZInt, readZLong, skipBytespublic BufferedChecksumIndexInput(IndexInput main)
public byte readByte()
throws java.io.IOException
DataInputreadByte in class DataInputjava.io.IOExceptionDataOutput.writeByte(byte)public void readBytes(byte[] b,
int offset,
int len)
throws java.io.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 readjava.io.IOExceptionDataOutput.writeBytes(byte[],int)public long getChecksum()
ChecksumIndexInputgetChecksum in class ChecksumIndexInputpublic void close()
throws java.io.IOException
IndexInputclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class IndexInputjava.io.IOExceptionpublic 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(java.lang.String sliceDescription, long offset, long length) throws java.io.IOException
IndexInputslice in class IndexInputjava.io.IOExceptionCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.