Documentation of 'org.apache.lucene.store.BufferedIndexInput' Java class
BufferedIndexInput
org.apache.lucene.store

Class BufferedIndexInput

  • All Implemented Interfaces:
    java.lang.Cloneable


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

      Fields 
      Modifier and Type Field and Description
      static int BUFFER_SIZE
      Default buffer size
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Returns a clone of this stream.
      int getBufferSize()
      Returns buffer size.
      long getFilePointer()
      Returns the current position in this file, where the next read will occur.
      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 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).
      void seek(long pos)
      Sets current position in this file, where the next read will occur.
      void setBufferSize(int newSize)
      Change the buffer size used by this IndexInput
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • BufferedIndexInput

        public BufferedIndexInput()
      • BufferedIndexInput

        public BufferedIndexInput(int bufferSize)
        Inits BufferedIndexInput with a specific bufferSize
    • Method Detail

      • setBufferSize

        public void setBufferSize(int newSize)
        Change the buffer size used by this IndexInput
      • getBufferSize

        public int getBufferSize()
        Returns buffer size. @see #setBufferSize
      • readBytes

        public void readBytes(byte[] b,
                              int offset,
                              int len)
                       throws java.io.IOException
        Description copied from class: IndexInput
        Reads a specified number of bytes into an array at the specified offset.
        Specified by:
        readBytes in class IndexInput
        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:
        java.io.IOException
        See Also:
        IndexOutput.writeBytes(byte[],int)
      • readBytes

        public void readBytes(byte[] b,
                              int offset,
                              int len,
                              boolean useBuffer)
                       throws java.io.IOException
        Description copied from class: IndexInput
        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). Currently only BufferedIndexInput respects this parameter.
        Overrides:
        readBytes in class IndexInput
        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
        useBuffer - set to false if the caller will handle buffering.
        Throws:
        java.io.IOException
        See Also:
        IndexOutput.writeBytes(byte[],int)
      • seek

        public void seek(long pos)
                  throws java.io.IOException
        Description copied from class: IndexInput
        Sets current position in this file, where the next read will occur.
        Specified by:
        seek in class IndexInput
        Throws:
        java.io.IOException
        See Also:
        IndexInput.getFilePointer()
      • clone

        public java.lang.Object clone()
        Description copied from class: IndexInput
        Returns a clone of this stream.

        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.

        Overrides:
        clone in class IndexInput

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.