public class

ChecksumIndexInput

extends IndexInput
java.lang.Object
   ↳ org.apache.lucene.store.IndexInput
     ↳ org.apache.lucene.store.ChecksumIndexInput

Class Overview

Writes bytes through to a primary IndexOutput, computing checksum as it goes. Note that you cannot use seek().

Summary

Public Constructors
ChecksumIndexInput(IndexInput main)
Public Methods
void close()
Closes the stream to further operations.
long getChecksum()
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.
void seek(long pos)
Sets current position in this file, where the next read will occur.
[Expand]
Inherited Methods
From class org.apache.lucene.store.IndexInput
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public ChecksumIndexInput (IndexInput main)

Public Methods

public void close ()

Closes the stream to further operations.

Throws
IOException

public long getChecksum ()

public long getFilePointer ()

Returns the current position in this file, where the next read will occur.

public long length ()

The number of bytes in the file.

public byte readByte ()

Reads and returns a single byte.

Throws
IOException

public void readBytes (byte[] b, int offset, int len)

Reads a specified number of bytes into an array at the specified offset.

Parameters
b the array to read bytes into
offset the offset in the array to start storing bytes
len the number of bytes to read
Throws
IOException

public void seek (long pos)

Sets current position in this file, where the next read will occur.