Class EndiannessReverserIndexInput
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
IndexInput
wrapper that changes the endianness of the provided index input.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
ARandomAccessInput
wrapper that changes the endianness of the provided index input. -
Field Summary
Fields inherited from class org.apache.lucene.store.FilterIndexInput
in
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of this stream.randomAccessSlice
(long offset, long length) Creates a random-access slice of this index input, with the given offset and length.void
readFloats
(float[] dst, int offset, int length) Reads a specified number of floats into an array at the specified offset.int
readInt()
Reads four bytes and returns an int (LE byte order).void
readInts
(int[] dst, int offset, int length) Reads a specified number of ints into an array at the specified offset.long
readLong()
Reads eight bytes and returns a long (LE byte order).void
readLongs
(long[] dst, int offset, int length) Read a specified number of longs.short
Reads two bytes and returns a short (LE byte order).Creates a slice of this index input, with the given description, offset, and length.Methods inherited from class org.apache.lucene.store.FilterIndexInput
close, getDelegate, getFilePointer, length, readByte, readBytes, seek, unwrap
Methods inherited from class org.apache.lucene.store.IndexInput
getFullSliceDescription, skipBytes, toString
Methods inherited from class org.apache.lucene.store.DataInput
readBytes, readMapOfStrings, readSetOfStrings, readString, readVInt, readVLong, readZInt, readZLong
-
Constructor Details
-
EndiannessReverserIndexInput
EndiannessReverserIndexInput(IndexInput in)
-
-
Method Details
-
readShort
Description copied from class:DataInput
Reads two bytes and returns a short (LE byte order).- Overrides:
readShort
in classDataInput
- Throws:
IOException
- See Also:
-
readInt
Description copied from class:DataInput
Reads four bytes and returns an int (LE byte order).- Overrides:
readInt
in classDataInput
- Throws:
IOException
- See Also:
-
readLong
Description copied from class:DataInput
Reads eight bytes and returns a long (LE byte order).- Overrides:
readLong
in classDataInput
- Throws:
IOException
- See Also:
-
readLongs
Description copied from class:DataInput
Read a specified number of longs.- Overrides:
readLongs
in classDataInput
- Throws:
IOException
-
readInts
Description copied from class:DataInput
Reads a specified number of ints into an array at the specified offset.- Overrides:
readInts
in classDataInput
- Parameters:
dst
- the array to read bytes intooffset
- the offset in the array to start storing intslength
- the number of ints to read- Throws:
IOException
-
readFloats
Description copied from class:DataInput
Reads a specified number of floats into an array at the specified offset.- Overrides:
readFloats
in classDataInput
- Parameters:
dst
- the array to read bytes intooffset
- the offset in the array to start storing floatslength
- the number of floats to read- Throws:
IOException
-
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
IndexInput
s, it will only callIndexInput.close()
on the original object.If you access the cloned IndexInput after closing the original object, any
readXXX
methods will throwAlreadyClosedException
.This method is NOT thread safe, so if the current
IndexInput
is being used by one thread whileclone
is called by another, disaster could strike.- Overrides:
clone
in classIndexInput
-
slice
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 classFilterIndexInput
- Throws:
IOException
-
randomAccessSlice
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 classIndexInput
- Throws:
IOException
-