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 |
writeBoolean(boolean flag) |
S |
writeByte(byte i8) |
S |
writeDouble(double d) |
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(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. |
default OutputStream outputStream()
default S writeStopBit(long x)
S writePosition(long position)
S writeLimit(long limit)
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 leftS writeByte(byte i8)
default S writeUnsignedByte(int i)
S writeShort(short i16)
default S writeUnsignedShort(int u16)
S writeInt(int i)
default S writeUnsignedInt(long i)
S writeLong(long i64)
S writeFloat(float f)
S writeDouble(double d)
default S write(BytesStore bytes)
default S write(BytesStore bytes, long offset, long length)
default S write(byte[] bytes)
S write(byte[] bytes, int offset, int length)
S write(ByteBuffer buffer)
default S writeBoolean(boolean flag)
S writeOrderedInt(int i)
S writeOrderedLong(long i)
void nativeWrite(long address, long size)
address
- to write to.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.