Class EndiannessReverserIndexInput

All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable

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

    • EndiannessReverserIndexInput

      EndiannessReverserIndexInput(IndexInput in)
  • Method Details

    • readShort

      public short readShort() throws IOException
      Description copied from class: DataInput
      Reads two bytes and returns a short (LE byte order).
      Overrides:
      readShort in class DataInput
      Throws:
      IOException
      See Also:
    • readInt

      public int readInt() throws IOException
      Description copied from class: DataInput
      Reads four bytes and returns an int (LE byte order).
      Overrides:
      readInt in class DataInput
      Throws:
      IOException
      See Also:
    • readLong

      public long readLong() throws IOException
      Description copied from class: DataInput
      Reads eight bytes and returns a long (LE byte order).
      Overrides:
      readLong in class DataInput
      Throws:
      IOException
      See Also:
    • readLongs

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

      public void readInts(int[] dst, int offset, int length) throws 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:
      IOException
    • readFloats

      public void readFloats(float[] dst, int offset, int length) throws 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:
      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(String sliceDescription, long offset, long length) throws 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:
      IOException
    • randomAccessSlice

      public RandomAccessInput randomAccessSlice(long offset, long length) throws IOException
      Description copied from class: IndexInput
      Creates a random-access slice of this index input, with the given offset and length.

      The default implementation calls IndexInput.slice(java.lang.String, long, long), and it doesn't support random access, it implements absolute reads as seek+read.

      Overrides:
      randomAccessSlice in class IndexInput
      Throws:
      IOException