public abstract class ChecksumIndexInput extends IndexInput
getChecksum()
.Modifier | Constructor and Description |
---|---|
protected |
ChecksumIndexInput(String resourceDescription)
resourceDescription should be a non-null, opaque string
describing this resource; it's returned from
IndexInput.toString() . |
Modifier and Type | Method and Description |
---|---|
abstract long |
getChecksum()
Returns the current checksum value
|
void |
seek(long pos)
Sets current position in this file, where the next read will occur.
|
clone, close, getFilePointer, getFullSliceDescription, length, randomAccessSlice, slice, toString
readByte, readBytes, readBytes, readInt, readLELongs, readLong, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong, skipBytes
protected ChecksumIndexInput(String resourceDescription)
IndexInput.toString()
.public abstract long getChecksum() throws IOException
IOException
public void seek(long pos) throws IOException
EOFException
and then the
stream is in an undetermined state.
ChecksumIndexInput
can only seek forward and seeks are expensive
since they imply to read bytes in-between the current position and the
target position in order to update the checksum.seek
in class IndexInput
IOException
IndexInput.getFilePointer()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.