Class WindowsDirectory.WindowsIndexInput

    • Field Detail

      • fd

        private final long fd
      • length

        private final long length
      • isClone

        boolean isClone
      • isOpen

        boolean isOpen
    • Constructor Detail

      • WindowsIndexInput

        public WindowsIndexInput​(java.nio.file.Path file,
                                 int bufferSize)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • readInternal

        protected void readInternal​(java.nio.ByteBuffer b)
                             throws java.io.IOException
        Description copied from class: BufferedIndexInput
        Expert: implements buffer refill. Reads bytes from the current position in the input.
        Specified by:
        readInternal in class BufferedIndexInput
        Parameters:
        b - the buffer to read bytes into
        Throws:
        java.io.IOException
      • 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
      • length

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

        public WindowsDirectory.WindowsIndexInput 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 call IndexInput.close() on the original object.

        If you access the cloned IndexInput after closing the original object, any readXXX methods will throw AlreadyClosedException.

        This method is NOT thread safe, so if the current IndexInput is being used by one thread while clone is called by another, disaster could strike.

        Overrides:
        clone in class BufferedIndexInput