Class BufferedIndexInput

All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable, RandomAccessInput

public abstract class BufferedIndexInput extends IndexInput implements RandomAccessInput
Base implementation class for buffered IndexInput.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default buffer size set to 1024.
    static final int
    A buffer size for merges set to 4096.
    static final int
    Minimum buffer size allowed
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferedIndexInput(String resourceDesc)
     
    BufferedIndexInput(String resourceDesc, int bufferSize)
    Inits BufferedIndexInput with a specific bufferSize
    BufferedIndexInput(String resourceDesc, IOContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    Returns default buffer sizes for the given IOContext
    Returns a clone of this stream.
    final int
    Returns buffer size.
    final long
    Returns the current position in this file, where the next read will occur.
    final byte
    Reads and returns a single byte.
    final byte
    readByte(long pos)
    Reads a byte at the given position in the file
    final void
    readBytes(byte[] b, int offset, int len)
    Reads a specified number of bytes into an array at the specified offset.
    final void
    readBytes(byte[] b, int offset, int len, boolean useBuffer)
    Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer).
    final int
    Reads four bytes and returns an int (LE byte order).
    final int
    readInt(long pos)
    Reads an integer (LE byte order) at the given position in the file
    protected abstract void
    Expert: implements buffer refill.
    final long
    Reads eight bytes and returns a long (LE byte order).
    final long
    readLong(long pos)
    Reads a long (LE byte order) at the given position in the file
    final short
    Reads two bytes and returns a short (LE byte order).
    final short
    readShort(long pos)
    Reads a short (LE byte order) at the given position in the file
    final int
    Reads an int stored in variable-length format.
    final long
    Reads a long stored in variable-length format.
    final void
    seek(long pos)
    Sets current position in this file, where the next read will occur.
    protected abstract void
    seekInternal(long pos)
    Expert: implements seek.
    slice(String sliceDescription, long offset, long length)
    Creates a slice of this index input, with the given description, offset, and length.
    wrap(String sliceDescription, IndexInput other, long offset, long length)
    Wraps a portion of another IndexInput with buffering.

    Methods inherited from class org.apache.lucene.store.IndexInput

    close, getFullSliceDescription, length, randomAccessSlice, skipBytes, toString

    Methods inherited from class org.apache.lucene.store.DataInput

    readFloats, readLongs, readMapOfStrings, readSetOfStrings, readString, readZInt, readZLong

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait