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 classARandomAccessInputwrapper 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.voidreadFloats(float[] dst, int offset, int length) Reads a specified number of floats into an array at the specified offset.intreadInt()Reads four bytes and returns an int (LE byte order).voidreadInts(int[] dst, int offset, int length) Reads a specified number of ints into an array at the specified offset.longreadLong()Reads eight bytes and returns a long (LE byte order).voidreadLongs(long[] dst, int offset, int length) Read a specified number of longs.shortReads 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, unwrapOnlyTestMethods inherited from class org.apache.lucene.store.IndexInput
getFullSliceDescription, skipBytes, toStringMethods inherited from class org.apache.lucene.store.DataInput
readBytes, readGroupVInt, readGroupVInts, readMapOfStrings, readSetOfStrings, readString, readVInt, readVLong, readZInt, readZLong
-
Constructor Details
-
EndiannessReverserIndexInput
EndiannessReverserIndexInput(IndexInput in)
-
-
Method Details
-
readShort
Description copied from class:DataInputReads two bytes and returns a short (LE byte order).- Overrides:
readShortin classDataInput- Throws:
IOException- See Also:
-
readInt
Description copied from class:DataInputReads four bytes and returns an int (LE byte order).- Overrides:
readIntin classDataInput- Throws:
IOException- See Also:
-
readLong
Description copied from class:DataInputReads eight bytes and returns a long (LE byte order).- Overrides:
readLongin classDataInput- Throws:
IOException- See Also:
-
readLongs
Description copied from class:DataInputRead a specified number of longs.- Overrides:
readLongsin classDataInput- Throws:
IOException
-
readInts
Description copied from class:DataInputReads a specified number of ints into an array at the specified offset.- Overrides:
readIntsin 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:DataInputReads a specified number of floats into an array at the specified offset.- Overrides:
readFloatsin 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:IndexInputReturns 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 callIndexInput.close()on the original object.If you access the cloned IndexInput after closing the original object, any
readXXXmethods will throwAlreadyClosedException.This method is NOT thread safe, so if the current
IndexInputis being used by one thread whilecloneis called by another, disaster could strike.- Overrides:
clonein classIndexInput
-
slice
Description copied from class:IndexInputCreates a slice of this index input, with the given description, offset, and length. The slice is sought to the beginning.- Overrides:
slicein classFilterIndexInput- Throws:
IOException
-
randomAccessSlice
Description copied from class:IndexInputCreates 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:
randomAccessSlicein classIndexInput- Throws:
IOException
-