-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public class LightweightRomBuffer extends RomBuffer
Lightweight
RomBufferimplementation which shares givenSeekableDataInputwith all its duplicates. This buffer isn't thread safe if underlyingSeekableDataInputalso isn't thread safe. If you need thread safe implementation please considerorg.jetbrains.bio.ThreadSafeStreamRomBufferclass.NB:
ThreadSafeStreamRomBufferclass relies on implementation details of this class to avoid unnecessary synchronization. If you change this class estimate impact onThreadSafeStreamRomBufferclass please.
-
-
Constructor Summary
Constructors Constructor Description LightweightRomBuffer(EndianSeekableDataInput input, ByteOrder order, Long maxLength, Long position, Long limit)
-
Method Summary
Modifier and Type Method Description LightweightRomBufferduplicate(Long position, Long limit)Returns a new buffer sharing the data with its parent. Unitclose()ByteArrayreadBytes(Integer size)BytereadByte()ShortreadShort()IntArrayreadInts(Integer size)IntegerreadInt()LongreadLong()FloatArrayreadFloats(Integer size)FloatreadFloat()DoublereadDouble()StringreadCString()ByteOrdergetOrder()LonggetMaxLength()LonggetPosition()LonggetLimit()UnitsetPosition(Long position)UnitsetLimit(Long limit)-
Methods inherited from class org.jetbrains.bio.LightweightRomBuffer
checkHeader, hasRemaining, readUnsignedByte, readUnsignedShort -
Methods inherited from class java.lang.AutoCloseable
equals, hashCode, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LightweightRomBuffer
LightweightRomBuffer(EndianSeekableDataInput input, ByteOrder order, Long maxLength, Long position, Long limit)
-
-
Method Detail
-
duplicate
LightweightRomBuffer duplicate(Long position, Long limit)
Returns a new buffer sharing the data with its parent.
-
readFloats
FloatArray readFloats(Integer size)
-
readDouble
Double readDouble()
-
readCString
String readCString()
-
getMaxLength
Long getMaxLength()
-
getPosition
Long getPosition()
-
setPosition
Unit setPosition(Long position)
-
-
-
-