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 ByteOrder |
byteOrder() |
Bytes |
bytesForRead() |
Bytes |
bytesForWrite() |
default long |
capacity() |
S |
clear() |
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() |
default long |
readRemaining() |
S |
readSkip(long bytesToSkip) |
default long |
start() |
default S |
write(byte[] bytes) |
S |
write(byte[] bytes,
int offset,
int length) |
S |
write(ByteBuffer buffer) |
default S |
write(BytesStore bytes) |
default S |
write(BytesStore bytes,
long offset,
long length) |
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 long |
writeLimit() |
S |
writeLimit(long limit) |
S |
writeLong(long i64) |
S |
writeOrderedInt(int i) |
S |
writeOrderedLong(long i) |
default long |
writePosition() |
S |
writePosition(long position) |
default long |
writeRemaining() |
S |
writeShort(short i16) |
S |
writeSkip(long bytesToSkip) |
default S |
writeStopBit(double d) |
default S |
writeStopBit(long x) |
default S |
writeUnsignedByte(int i) |
default S |
writeUnsignedInt(long i) |
default S |
writeUnsignedShort(int u16) |
default S |
writeUTFΔ(CharSequence cs)
Write the same encoding as
writeUTF with the following changes. |
@NotNull default OutputStream outputStream()
@NotNull default S writeStopBit(long x)
default S writeStopBit(double d)
S writePosition(long position)
S writeLimit(long limit)
@NotNull default S writeUTFΔ(CharSequence cs) throws BufferOverflowException
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 leftdefault S write8bit(CharSequence cs)
default S write8bit(CharSequence s, int start, int length)
default S write(CharSequence cs)
default S write(CharSequence s, int start, int length)
default S write8bit(@NotNull BytesStore sdi)
@NotNull S writeByte(byte i8)
@NotNull default S writeUnsignedByte(int i)
@NotNull S writeShort(short i16)
@NotNull default S writeUnsignedShort(int u16)
@NotNull S writeInt(int i)
@NotNull default S writeUnsignedInt(long i)
@NotNull S writeLong(long i64)
@NotNull S writeFloat(float f)
@NotNull S writeDouble(double d)
@NotNull default S write(@NotNull BytesStore bytes)
@NotNull default S write(@NotNull BytesStore bytes, long offset, long length)
@NotNull default S write(@NotNull byte[] bytes)
@NotNull S write(byte[] bytes, int offset, int length)
@NotNull S write(ByteBuffer buffer)
@NotNull default S writeBoolean(boolean flag)
@NotNull S writeOrderedInt(int i)
@NotNull S writeOrderedLong(long i)
void nativeWrite(long address, long size)
address
- to write to.size
- in bytes.default <E extends Enum<E>> void writeEnum(E e)
@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.