public interface StreamingDataOutput<S extends StreamingDataOutput<S>>
The use of this instance is single threaded, though the use of the data
| Modifier and Type | Method and Description |
|---|---|
long |
address(long offset)
Obtain the underlying address.
|
default S |
appendUtf8(char[] chars,
int offset,
int length) |
default S |
appendUtf8(CharSequence cs) |
default S |
appendUtf8(CharSequence cs,
int offset,
int length) |
default S |
appendUtf8(int codepoint) |
default ByteOrder |
byteOrder() |
Bytes |
bytesForRead() |
Bytes |
bytesForWrite() |
default long |
capacity() |
S |
clear()
Set the readPosition= writePosition = start, writeLimit = 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.
|
default void |
copyFrom(InputStream input) |
boolean |
isNative() |
void |
nativeWrite(long address,
long size)
This is an expert level method for writing out data to native memory.
|
default OutputStream |
outputStream() |
default long |
readLimit() |
default long |
readPosition()
The read position must be start() <= readPosition() && readPosition() <= readLimit() && readPosition < safeLimit()
|
default long |
readRemaining() |
boolean |
sharedMemory() |
default long |
start() |
default S |
write(byte[] bytes) |
S |
write(byte[] bytes,
int offset,
int length)
Write all data or fail.
|
default S |
write(BytesStore bytes)
Write all data or fail.
|
default S |
write(BytesStore bytes,
long offset,
long length)
Write all data or fail.
|
default S |
write(CharSequence cs) |
default S |
write(CharSequence s,
int start,
int length) |
default S |
write8bit(BytesStore sdi) |
default S |
write8bit(CharSequence cs) |
default S |
write8bit(CharSequence s,
int start,
int length) |
default S |
write8bit(String s) |
default S |
writeBoolean(boolean flag) |
S |
writeByte(byte i8) |
S |
writeDouble(double d) |
default <E extends Enum<E>> |
writeEnum(E e) |
S |
writeFloat(float f) |
S |
writeInt(int i) |
default S |
writeInt24(int i) |
default long |
writeLimit() |
S |
writeLimit(long limit) |
S |
writeLong(long i64) |
S |
writeOrderedInt(int i) |
S |
writeOrderedLong(long i) |
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
S |
writePosition(long position) |
default void |
writePositionRemaining(long position,
long length) |
default long |
writeRemaining() |
S |
writeShort(short i16) |
S |
writeSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
S |
writeSome(ByteBuffer buffer) |
default S |
writeSome(Bytes bytes) |
default S |
writeStopBit(double d) |
default S |
writeStopBit(long x)
Write a stop bit encoded long
|
default S |
writeUnsignedByte(int i) |
default S |
writeUnsignedInt(long i) |
default S |
writeUnsignedShort(int u16) |
default S |
writeUtf8(CharSequence cs)
Write the same encoding as
writeUTF with the following changes. |
default S |
writeUtf8(String s) |
default S |
writeUTFΔ(CharSequence cs)
Deprecated.
|
S writePosition(long position) throws BufferOverflowException
BufferOverflowExceptionS writeLimit(long limit) throws BufferOverflowException
BufferOverflowExceptionS writeSkip(long bytesToSkip) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
bytesToSkip - bytes to skip.BufferOverflowException - if the offset is outside the limits of the BytesIORuntimeException - if an error occurred trying to obtain the data.net.openhft.chronicle.core.io.IORuntimeException@NotNull default OutputStream outputStream()
@NotNull default S writeStopBit(long x) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
x - long to writeBufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S writeStopBit(double d) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeUtf8(CharSequence cs) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeUTF with the following changes. 1) The length is stop bit encoded
i.e. one byte longer for short strings, but is not limited in length. 2) The string can be null.cs - the string value to be written. Can be null.BufferOverflowException - if there is not enough space leftnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S writeUtf8(String s) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@Deprecated default S writeUTFΔ(CharSequence cs) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S write8bit(CharSequence cs) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S write8bit(CharSequence s, int start, int length) throws BufferOverflowException, IllegalArgumentException, IndexOutOfBoundsException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionIndexOutOfBoundsExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S write(CharSequence cs) throws BufferOverflowException, BufferUnderflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionBufferUnderflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S write(CharSequence s, int start, int length) throws BufferOverflowException, IllegalArgumentException, IndexOutOfBoundsException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionIndexOutOfBoundsExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S write8bit(@NotNull String s) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S write8bit(@NotNull BytesStore sdi) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeByte(byte i8) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeUnsignedByte(int i) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeShort(short i16) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeUnsignedShort(int u16) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeInt24(int i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeInt(int i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeUnsignedInt(long i) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeLong(long i64) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeFloat(float f) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeDouble(double d) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S write(@NotNull BytesStore bytes) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeSome(@NotNull Bytes bytes) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S write(@NotNull BytesStore bytes, long offset, long length) throws BufferOverflowException, BufferUnderflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionBufferUnderflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S write(@NotNull byte[] bytes) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S write(byte[] bytes, int offset, int length) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeSome(ByteBuffer buffer) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull default S writeBoolean(boolean flag) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeOrderedInt(int i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeException@NotNull S writeOrderedLong(long i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionvoid nativeWrite(long address,
long size)
throws BufferOverflowException,
net.openhft.chronicle.core.io.IORuntimeException
address - to write to.size - in bytes.BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault <E extends Enum<E>> void writeEnum(E e) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S appendUtf8(CharSequence cs) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S appendUtf8(int codepoint) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S appendUtf8(char[] chars, int offset, int length) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault S appendUtf8(CharSequence cs, int offset, int length) throws BufferOverflowException, IllegalArgumentException, net.openhft.chronicle.core.io.IORuntimeException
BufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault void copyFrom(InputStream input) throws IOException, BufferOverflowException, IllegalArgumentException
default void writePositionRemaining(long position,
long length)
@NotNull S clear()
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,
IllegalArgumentException
offset - within this buffer. address(start()) is the actual address of the first byte.UnsupportedOperationException - if the underlying buffer is on the heapIllegalArgumentException - if the offset is before the start() or the after the capacity()default ByteOrder byteOrder()
Bytes bytesForRead() throws IllegalStateException
IllegalStateExceptionBytes bytesForWrite() throws IllegalStateException
IllegalStateExceptionboolean compareAndSwapInt(long offset,
int expected,
int value)
throws BufferOverflowException,
IllegalArgumentException,
net.openhft.chronicle.core.io.IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionboolean compareAndSwapLong(long offset,
long expected,
long value)
throws BufferOverflowException,
IllegalArgumentException,
net.openhft.chronicle.core.io.IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault boolean compareAndSwapFloat(long offset,
float expected,
float value)
throws BufferOverflowException,
IllegalArgumentException,
net.openhft.chronicle.core.io.IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptiondefault boolean compareAndSwapDouble(long offset,
double expected,
double value)
throws BufferOverflowException,
IllegalArgumentException,
net.openhft.chronicle.core.io.IORuntimeException
offset - to perform CASexpected - valuevalue - to setBufferOverflowExceptionIllegalArgumentExceptionnet.openhft.chronicle.core.io.IORuntimeExceptionboolean isNative()
boolean sharedMemory()
Copyright © 2016. All rights reserved.