Class BufferedIndexInput

All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable

public abstract class BufferedIndexInput extends IndexInput
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.
  • 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 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.
    final long
    Reads eight bytes and returns a long.
    final short
    Reads two bytes and returns a short.
    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.
    final void
    setBufferSize(int newSize)
    Change the buffer size used by this IndexInput

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

    close, length, toString

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

    readString, readStringSet, readStringStringMap

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • BUFFER_SIZE

      public static final int BUFFER_SIZE
      Default buffer size set to 1024.
      See Also:
    • MERGE_BUFFER_SIZE

      public static final int MERGE_BUFFER_SIZE
      A buffer size for merges set to 4096.
      See Also:
  • Constructor Details

    • BufferedIndexInput

      public BufferedIndexInput(String resourceDesc)
    • BufferedIndexInput

      public BufferedIndexInput(String resourceDesc, IOContext context)
    • BufferedIndexInput

      public BufferedIndexInput(String resourceDesc, int bufferSize)
      Inits BufferedIndexInput with a specific bufferSize
  • Method Details