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.
|
seek
getFullSliceDescription, randomAccessSlice, toString
readBytes, readInt, readLELongs, readLong, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong, skipBytes
public BufferedChecksumIndexInput(IndexInput main)
public byte readByte() throws IOException
DataInput
readByte
in class DataInput
IOException
DataOutput.writeByte(byte)
public void readBytes(byte[] b, int offset, int len) throws IOException
DataInput
readBytes
in class DataInput
b
- the array to read bytes intooffset
- the offset in the array to start storing byteslen
- the number of bytes to readIOException
DataOutput.writeBytes(byte[],int)
public long getChecksum()
ChecksumIndexInput
getChecksum
in class ChecksumIndexInput
public void close() throws IOException
IndexInput
close
in interface Closeable
close
in interface AutoCloseable
close
in class IndexInput
IOException
public long getFilePointer()
IndexInput
getFilePointer
in class IndexInput
IndexInput.seek(long)
public long length()
IndexInput
length
in class IndexInput
public IndexInput clone()
IndexInput
Clones 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
IndexInput
s, 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 IndexInput
public IndexInput slice(String sliceDescription, long offset, long length) throws IOException
IndexInput
slice
in class IndexInput
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.