public interface StreamingDataInput<S extends StreamingDataInput<S>>
Modifier and Type | Method and Description |
---|---|
long |
address(long offset)
Obtain the underlying address.
|
default ByteOrder |
byteOrder() |
Bytes |
bytesForRead() |
Bytes |
bytesForWrite() |
default long |
capacity() |
S |
clear() |
default InputStream |
inputStream() |
void |
nativeRead(long address,
long size)
This is an expert level method for copying raw native memory in bulk.
|
default <R> R |
parseWithLength(long length,
java.util.function.Function<S,R> bytesConsumer) |
int |
peekUnsignedByte() |
default void |
read(byte[] bytes) |
default void |
read(ByteBuffer buffer) |
default boolean |
readBoolean() |
byte |
readByte() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
default long |
readLimit() |
S |
readLimit(long limit) |
long |
readLong() |
default long |
readPosition() |
S |
readPosition(long position) |
default long |
readRemaining() |
short |
readShort() |
S |
readSkip(long bytesToSkip) |
default long |
readStopBit() |
default int |
readUnsignedByte() |
default long |
readUnsignedInt() |
default int |
readUnsignedShort() |
default String |
readUTFΔ()
The same as readUTF() except the length is stop bit encoded.
|
default <ACS extends Appendable & CharSequence> |
readUTFΔ(ACS sb)
The same as readUTFΔ() except the chars are copied to a truncated StringBuilder.
|
int |
readVolatileInt() |
long |
readVolatileLong() |
default void |
readWithLength(long length,
java.util.function.Consumer<S> bytesConsumer)
Perform a set of actions with a temporary bounds mode.
|
default long |
start() |
default long |
writeLimit() |
default long |
writePosition() |
default long |
writeRemaining() |
S |
writeSkip(long bytesToSkip) |
S readPosition(long position)
S readLimit(long limit)
default void readWithLength(long length, java.util.function.Consumer<S> bytesConsumer)
default <R> R parseWithLength(long length, java.util.function.Function<S,R> bytesConsumer)
default InputStream inputStream()
default long readStopBit()
default boolean readBoolean()
byte readByte()
default int readUnsignedByte()
short readShort()
default int readUnsignedShort()
int readInt()
default long readUnsignedInt()
long readLong()
float readFloat()
double readDouble()
@Nullable default String readUTFΔ()
null
values are also supportednull
if writeUTFΔ(null)
was calleddefault <ACS extends Appendable & CharSequence> boolean readUTFΔ(ACS sb) throws net.openhft.chronicle.bytes.UTFDataFormatRuntimeException
sb
- to copy chars totrue
if there was a String, or false
if it was null
net.openhft.chronicle.bytes.UTFDataFormatRuntimeException
default void read(byte[] bytes)
default void read(ByteBuffer buffer)
int readVolatileInt()
long readVolatileLong()
int peekUnsignedByte()
void nativeRead(long address, long size)
address
- of the memory.size
- in bytes.S clear()
S readSkip(long bytesToSkip)
S writeSkip(long bytesToSkip)
default long start()
default long capacity()
default long readPosition()
default long writePosition()
default long readRemaining()
default long writeRemaining()
default long readLimit()
default long writeLimit()
long address(long offset) throws UnsupportedOperationException
offset
- within this buffer. address(start()) is the actual address of the first byte.UnsupportedOperationException
- if the underlying buffer is on the heapdefault ByteOrder byteOrder()
Bytes bytesForRead()
Bytes bytesForWrite()
Copyright © 2015. All rights reserved.