public interface StreamingDataInput<S extends StreamingDataInput<S>> extends StreamingCommon<S>
| Modifier and Type | Method and Description |
|---|---|
long |
addressForRead(long offset)
Obtain the underlying addressForRead.
|
default long |
addressForRead(long offset,
int buffer) |
long |
addressForWrite(long offset)
Obtain the underlying addressForRead.
|
default ByteOrder |
byteOrder() |
Bytes |
bytesForRead() |
Bytes |
bytesForWrite() |
default long |
capacity() |
default boolean |
compareAndSwapDouble(long offset,
double expected,
double value)
Perform a 64-bit double CAS at a given offset.
|
default boolean |
compareAndSwapFloat(long offset,
float expected,
float value)
Perform a 32-bit float CAS at a given offset.
|
boolean |
compareAndSwapInt(long offset,
int expected,
int value)
Perform a 32-bit CAS at a given offset.
|
boolean |
compareAndSwapLong(long offset,
long expected,
long value)
Perform a 64-bit CAS at a given offset.
|
long |
copyTo(BytesStore to) |
void |
copyTo(OutputStream out) |
default InputStream |
inputStream() |
boolean |
isDirectMemory() |
boolean |
lenient() |
void |
lenient(boolean lenient)
When there is no more data to read, return zero, false and empty string.
|
void |
nativeRead(long address,
long size)
Deprecated.
|
default long |
parseHexLong() |
default void |
parseUTF(Appendable sb,
int length)
Deprecated.
|
default void |
parseUtf8(Appendable sb,
int length) |
int |
peekUnsignedByte() |
default int |
read(byte[] bytes) |
default int |
read(byte[] bytes,
int off,
int len) |
default void |
read(ByteBuffer buffer) |
default void |
read(Bytes bytes,
int length) |
default int |
read(char[] bytes,
int off,
int len) |
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() |
default void |
readHistogram(net.openhft.chronicle.core.util.Histogram histogram) |
int |
readInt() |
default int |
readInt24() |
default long |
readLimit() |
S |
readLimit(long limit) |
long |
readLong() |
default long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
S |
readPosition(long position) |
default S |
readPositionRemaining(long position,
long remaining) |
default S |
readPositionUnlimited(long position) |
default long |
readRemaining() |
short |
readShort() |
S |
readSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
default long |
readStopBit() |
default char |
readStopBitChar() |
default double |
readStopBitDecimal() |
default double |
readStopBitDouble() |
int |
readUnsignedByte() |
default long |
readUnsignedInt() |
default int |
readUnsignedInt24() |
default int |
readUnsignedShort() |
default String |
readUtf8()
The same as readUTF() except the length is stop bit encoded.
|
default <ACS extends Appendable & CharSequence> |
readUtf8(ACS sb)
The same as readUtf8() except the chars are copied to a truncated StringBuilder.
|
default String |
readUTFΔ()
Deprecated.
|
default <ACS extends Appendable & CharSequence> |
readUTFΔ(ACS sb)
Deprecated.
|
int |
readVolatileInt() |
long |
readVolatileLong() |
default void |
readWithLength(Bytes bytes) |
default void |
readWithLength(long length,
net.openhft.chronicle.core.util.ThrowingConsumer<S,net.openhft.chronicle.core.io.IORuntimeException> bytesConsumer)
Perform a set of actions with a temporary bounds mode.
|
default void |
readWithLength0(long length,
net.openhft.chronicle.core.util.ThrowingConsumerNonCapturing<S,net.openhft.chronicle.core.io.IORuntimeException,BytesOut> bytesConsumer,
StringBuilder sb,
BytesOut toBytes)
Perform a set of actions with a temporary bounds mode.
|
boolean |
sharedMemory() |
default long |
start() |
void |
testAndSetInt(long offset,
int expected,
int value) |
void |
uncheckedReadSkipBackOne()
Read skip -1 when you are sure this is safe.
|
void |
uncheckedReadSkipOne()
Read skip 1 when you are sure this is safe.
|
int |
uncheckedReadUnsignedByte() |
default long |
writeLimit() |
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
default long |
writeRemaining() |
clear@NotNull S readPosition(long position) throws BufferUnderflowException
BufferUnderflowException@NotNull default S readPositionUnlimited(long position) throws BufferUnderflowException
BufferUnderflowException@NotNull default S readPositionRemaining(long position, long remaining) throws BufferUnderflowException
BufferUnderflowException@NotNull S readLimit(long limit) throws BufferUnderflowException
BufferUnderflowException@NotNull S readSkip(long bytesToSkip) throws BufferUnderflowException
bytesToSkip - bytes to skip.BufferUnderflowException - if the offset is outside the limits of the Bytesvoid uncheckedReadSkipOne()
void uncheckedReadSkipBackOne()
default void readWithLength0(long length,
@NotNull
net.openhft.chronicle.core.util.ThrowingConsumerNonCapturing<S,net.openhft.chronicle.core.io.IORuntimeException,BytesOut> bytesConsumer,
StringBuilder sb,
BytesOut toBytes)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault void readWithLength(long length,
@NotNull
net.openhft.chronicle.core.util.ThrowingConsumer<S,net.openhft.chronicle.core.io.IORuntimeException> bytesConsumer)
throws BufferUnderflowException,
net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default InputStream inputStream()
default long readStopBit()
throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeExceptiondefault char readStopBitChar()
throws net.openhft.chronicle.core.io.IORuntimeException
net.openhft.chronicle.core.io.IORuntimeExceptiondefault double readStopBitDouble()
default double readStopBitDecimal()
throws BufferOverflowException
BufferOverflowExceptiondefault boolean readBoolean()
byte readByte()
int readUnsignedByte()
int uncheckedReadUnsignedByte()
short readShort()
throws BufferUnderflowException
BufferUnderflowExceptiondefault int readUnsignedShort()
throws BufferUnderflowException
BufferUnderflowExceptiondefault int readInt24()
throws BufferUnderflowException
BufferUnderflowExceptiondefault int readUnsignedInt24()
throws BufferUnderflowException
BufferUnderflowExceptionint readInt()
throws BufferUnderflowException
BufferUnderflowExceptiondefault long readUnsignedInt()
throws BufferUnderflowException
BufferUnderflowExceptionlong readLong()
throws BufferUnderflowException
BufferUnderflowExceptionfloat readFloat()
throws BufferUnderflowException
BufferUnderflowExceptiondouble readDouble()
throws BufferUnderflowException
BufferUnderflowException@Nullable default String readUtf8() throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException
null values are also supportednull if writeUtf8(null) was calledBufferUnderflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionIllegalArgumentException@Nullable @Deprecated default String readUTFΔ() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException, IllegalArgumentException
net.openhft.chronicle.core.io.IORuntimeExceptionBufferUnderflowExceptionIllegalArgumentException@Nullable default String read8bit() throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeExceptionBufferUnderflowExceptiondefault <ACS extends Appendable & CharSequence> boolean readUtf8(@NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException
sb - to copy chars totrue if there was a String, or false if it was nullnet.openhft.chronicle.core.io.IORuntimeExceptionIllegalArgumentExceptionBufferUnderflowException@Deprecated default <ACS extends Appendable & CharSequence> boolean readUTFΔ(@NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeExceptionIllegalArgumentExceptionBufferUnderflowExceptiondefault boolean read8bit(@NotNull
Bytes b)
throws BufferUnderflowException,
IllegalStateException,
BufferOverflowException
default <ACS extends Appendable & CharSequence> boolean read8bit(@NotNull ACS sb) throws net.openhft.chronicle.core.io.IORuntimeException, IllegalArgumentException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeExceptionIllegalArgumentExceptionBufferUnderflowExceptiondefault boolean read8bit(@NotNull
StringBuilder sb)
throws net.openhft.chronicle.core.io.IORuntimeException,
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeExceptionBufferUnderflowExceptiondefault int read(@NotNull
byte[] bytes)
default int read(@NotNull
byte[] bytes,
int off,
int len)
default int read(@NotNull
char[] bytes,
int off,
int len)
default void read(@NotNull
ByteBuffer buffer)
default void read(@NotNull
Bytes bytes,
int length)
int readVolatileInt()
throws BufferUnderflowException
BufferUnderflowExceptionlong readVolatileLong()
throws BufferUnderflowException
BufferUnderflowExceptionint peekUnsignedByte()
@Deprecated void nativeRead(long address, long size) throws BufferUnderflowException
address - of the memory.size - in bytes.BufferUnderflowException@NotNull default <E extends Enum<E>> E readEnum(@NotNull Class<E> eClass) throws net.openhft.chronicle.core.io.IORuntimeException, BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeExceptionBufferUnderflowException@Deprecated default void parseUTF(Appendable sb, int length) throws IllegalArgumentException, BufferUnderflowException, UTFDataFormatRuntimeException
default void parseUtf8(Appendable sb, int length) throws IllegalArgumentException, BufferUnderflowException, UTFDataFormatRuntimeException
default long parseHexLong()
void copyTo(OutputStream out) throws IOException
IOExceptionlong copyTo(BytesStore to)
default void readHistogram(@NotNull
net.openhft.chronicle.core.util.Histogram histogram)
default void readWithLength(Bytes bytes)
void lenient(boolean lenient)
lenient - if true, return nothing rather than error.boolean lenient()
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 addressForRead(long offset)
throws UnsupportedOperationException,
BufferUnderflowException
offset - within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException - if the underlying buffer is on the heapBufferUnderflowException - if the offset is before the start() or the after the capacity()default long addressForRead(long offset,
int buffer)
throws UnsupportedOperationException,
BufferUnderflowException
long addressForWrite(long offset)
throws UnsupportedOperationException,
BufferOverflowException
offset - within this buffer. addressForRead(start()) is the actual addressForRead of the first byte.UnsupportedOperationException - if the underlying buffer is on the heapBufferOverflowException - if the offset is before the start() or the after the capacity()default ByteOrder byteOrder()
@NotNull Bytes bytesForRead() throws IllegalStateException
IllegalStateException@NotNull Bytes bytesForWrite() throws IllegalStateException
IllegalStateExceptionboolean compareAndSwapInt(long offset,
int expected,
int value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionvoid testAndSetInt(long offset,
int expected,
int value)
boolean compareAndSwapLong(long offset,
long expected,
long value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptiondefault boolean compareAndSwapFloat(long offset,
float expected,
float value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptiondefault boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionboolean sharedMemory()
boolean isDirectMemory()
Copyright © 2018. All rights reserved.