Class EndiannessReverserIndexInput

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Cloneable

    final class EndiannessReverserIndexInput
    extends FilterIndexInput
    A IndexInput wrapper that changes the endianness of the provided index input.
    • Constructor Detail

      • EndiannessReverserIndexInput

        EndiannessReverserIndexInput​(IndexInput in)
    • Method Detail

      • readLongs

        public void readLongs​(long[] dst,
                              int offset,
                              int length)
                       throws java.io.IOException
        Description copied from class: DataInput
        Read a specified number of longs.
        Overrides:
        readLongs in class DataInput
        Throws:
        java.io.IOException
      • readInts

        public void readInts​(int[] dst,
                             int offset,
                             int length)
                      throws java.io.IOException
        Description copied from class: DataInput
        Reads a specified number of ints into an array at the specified offset.
        Overrides:
        readInts in class DataInput
        Parameters:
        dst - the array to read bytes into
        offset - the offset in the array to start storing ints
        length - the number of ints to read
        Throws:
        java.io.IOException
      • readFloats

        public void readFloats​(float[] dst,
                               int offset,
                               int length)
                        throws java.io.IOException
        Description copied from class: DataInput
        Reads a specified number of floats into an array at the specified offset.
        Overrides:
        readFloats in class DataInput
        Parameters:
        dst - the array to read bytes into
        offset - the offset in the array to start storing floats
        length - the number of floats to read
        Throws:
        java.io.IOException
      • clone

        public IndexInput 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 IndexInput
      • slice

        public IndexInput slice​(java.lang.String sliceDescription,
                                long offset,
                                long length)
                         throws java.io.IOException
        Description copied from class: IndexInput
        Creates a slice of this index input, with the given description, offset, and length. The slice is sought to the beginning.
        Overrides:
        slice in class FilterIndexInput
        Throws:
        java.io.IOException