Class FSDirectory.FSIndexInput

    • Field Detail

      • file

        protected final java.io.RandomAccessFile file
        the underlying RandomAccessFile
      • off

        protected final long off
        start offset: non-zero in the slice case
      • end

        protected final long end
        end offset (start+length)
    • Constructor Detail

      • FSIndexInput

        protected FSIndexInput​(java.lang.String resourceDesc,
                               java.io.File path,
                               IOContext context)
                        throws java.io.IOException
        Create a new FSIndexInput, reading the entire file from path
        Throws:
        java.io.IOException
      • FSIndexInput

        protected FSIndexInput​(java.lang.String resourceDesc,
                               java.io.RandomAccessFile file,
                               long off,
                               long length,
                               int bufferSize)
        Create a new FSIndexInput, representing a slice of an existing open file
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: IndexInput
        Closes the stream to further operations.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class IndexInput
        Throws:
        java.io.IOException
      • clone

        public FSDirectory.FSIndexInput 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.

        Warning: Lucene never closes cloned IndexInputs, it will only do this on the original one. The original instance must take care that cloned instances throw AlreadyClosedException when the original one is closed.

        Overrides:
        clone in class BufferedIndexInput
      • length

        public final long length()
        Description copied from class: IndexInput
        The number of bytes in the file.
        Specified by:
        length in class IndexInput