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 int |
read(byte[] bytes,
int off,
int len) |
default void |
read(ByteBuffer buffer) |
default String |
read8bit() |
default <ACS extends Appendable & CharSequence> |
read8bit(ACS sb) |
default boolean |
read8bit(Bytes b) |
default boolean |
read8bit(StringBuilder sb) |
default boolean |
readBoolean() |
byte |
readByte() |
double |
readDouble() |
default <E extends Enum<E>> |
readEnum(Class<E> eClass) |
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 double |
readStopBitDouble() |
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, @NotNull java.util.function.Consumer<S> bytesConsumer)
default <R> R parseWithLength(long length, @NotNull java.util.function.Function<S,R> bytesConsumer)
@NotNull default InputStream inputStream()
default long readStopBit()
default double readStopBitDouble()
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 called@Nullable default String read8bit()
default <ACS extends Appendable & CharSequence> boolean readUTFΔ(@NotNull 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 boolean read8bit(@NotNull Bytes b) throws net.openhft.chronicle.bytes.UTFDataFormatRuntimeException
net.openhft.chronicle.bytes.UTFDataFormatRuntimeException
default <ACS extends Appendable & CharSequence> boolean read8bit(@NotNull ACS sb) throws net.openhft.chronicle.bytes.UTFDataFormatRuntimeException
net.openhft.chronicle.bytes.UTFDataFormatRuntimeException
default boolean read8bit(StringBuilder sb)
default void read(@NotNull byte[] bytes)
default int read(@NotNull byte[] bytes, int off, int len)
default void read(@NotNull ByteBuffer buffer)
int readVolatileInt()
long readVolatileLong()
int peekUnsignedByte()
void nativeRead(long address, long size)
address
- of the memory.size
- in bytes.@NotNull 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.