public interface ByteStringAppender<B extends ByteStringAppender<B>> extends StreamingDataOutput<B>, Appendable
JAVA9_STRING_CODER_LATIN, JAVA9_STRING_CODER_UTF16
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.
|
long |
addressForWritePosition() |
default B |
append(@NotNull BigDecimal bigDecimal) |
default B |
append(boolean flag)
Append a boolean as T or F
|
default B |
append(char ch)
Append a char in UTF-8
|
default B |
append(@NotNull CharSequence cs)
Append a characters in UTF-8
|
default B |
append(@NotNull CharSequence cs,
int start,
int end)
Append a portion of a String to the Bytes in UTF-8.
|
default B |
append(double d)
Append a double in decimal notation
|
default B |
append(double d,
int decimalPlaces)
Append a double in decimal notation to a specific number of decimal places.
|
default B |
append(float f)
Append a float in decimal notation
|
default B |
append(int value)
Append an int in decimal
|
default B |
append(long value)
Append a long in decimal
|
default B |
append8bit(@NotNull BytesStore bs) |
default B |
append8bit(@NotNull BytesStore bs,
long start,
long end) |
default B |
append8bit(@NotNull CharSequence cs)
Append a String to the Bytes in ISO-8859-1
|
default B |
append8bit(@NotNull CharSequence cs,
int start,
int end)
Append a portion of a String to the Bytes in ISO-8859-1
|
default B |
append8bit(@NotNull String cs) |
default B |
appendBase(long value,
int base) |
default B |
appendBase16(long value) |
default B |
appendBase16(long value,
int minDigits) |
default B |
appendDateMillis(long dateInMillis) |
default B |
appendDecimal(long value,
int decimalPlaces)
Append a long in decimal with a given number of decimal places.
|
default B |
appendTimeMillis(long timeOfDayInMillis) |
default ByteOrder |
byteOrder() |
@NotNull Bytes |
bytesForRead() |
@NotNull 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.
|
boolean |
isDirectMemory() |
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() |
void |
testAndSetInt(long offset,
int expected,
int value) |
default long |
writeLimit() |
default long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
default @NotNull Writer |
writer() |
default long |
writeRemaining() |
alignBy, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, appendUtf8, canWriteDirect, copyFrom, nativeWrite, outputStream, rawWriteByte, rawWriteInt, realCapacity, realWriteRemaining, write, write, write, write, write, write, write, write, write8bit, write8bit, write8bit, write8bit, writeBigDecimal, writeBigInteger, writeBoolean, writeByte, writeChar, writeDouble, writeDoubleAndInt, writeEnum, writeFloat, writeHistogram, writeInt, writeInt24, writeIntAdv, writeLimit, writeLong, writeLongAdv, writeOrderedInt, writeOrderedLong, writePosition, writePositionRemaining, writeShort, writeSkip, writeSome, writeSome, writeStopBit, writeStopBit, writeStopBit, writeStopBitDecimal, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt24, writeUnsignedShort, writeUtf8, writeUtf8, writeUTFΔ, writeWithLength
clear
@NotNull default @NotNull Writer writer()
@NotNull default B append(char ch) throws BufferOverflowException
append
in interface Appendable
ch
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceededBufferOverflowException
@NotNull default B append(@NotNull @NotNull CharSequence cs) throws BufferOverflowException
append
in interface Appendable
cs
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceededBufferOverflowException
@NotNull default B append(boolean flag) throws BufferOverflowException
flag
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B append(int value) throws BufferOverflowException
value
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B append(long value) throws BufferOverflowException
value
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B appendBase(long value, int base) throws BufferOverflowException
BufferOverflowException
@NotNull default B appendBase16(long value) throws BufferOverflowException
BufferOverflowException
@NotNull default B appendBase16(long value, int minDigits) throws BufferOverflowException
BufferOverflowException
@NotNull default B appendDecimal(long value, int decimalPlaces) throws BufferOverflowException
value
- to appenddecimalPlaces
- to shift the decimal place.BufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B append(float f) throws BufferOverflowException
f
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B append(double d) throws BufferOverflowException
d
- to appendBufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B append(double d, int decimalPlaces) throws BufferOverflowException
If the number would normally be printed with more decimal places, the number is rounded.
d
- to appenddecimalPlaces
- to always produceBufferUnderflowException
- if the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.IORuntimeException
- if an error occurred while attempting to resize the underlying bufferBufferOverflowException
@NotNull default B append(@NotNull @NotNull CharSequence cs, int start, int end) throws IndexOutOfBoundsException, BufferOverflowException
append
in interface Appendable
cs
- to copystart
- index of the first char inclusiveend
- index of the last char exclusive.BufferUnderflowException
- if the capacity of the underlying buffer was exceededIndexOutOfBoundsException
BufferOverflowException
@NotNull default B append8bit(@NotNull @NotNull CharSequence cs) throws BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException
cs
- to writeBufferOverflowException
- If the string as too large to write in the capacity availableBufferUnderflowException
- if the capacity of the underlying buffer was exceededIndexOutOfBoundsException
default B append8bit(@NotNull @NotNull BytesStore bs) throws BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException
default B append8bit(@NotNull @NotNull String cs) throws BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException
default B append8bit(@NotNull @NotNull CharSequence cs, int start, int end) throws IllegalArgumentException, BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException
cs
- to copystart
- index of the first char inclusiveend
- index of the last char exclusive.BufferOverflowException
- If the string as too large to write in the capacity availableBufferUnderflowException
- if the capacity of the underlying buffer was exceededIndexOutOfBoundsException
- if the start or the end are not valid for the CharSequenceIllegalArgumentException
default B append8bit(@NotNull @NotNull BytesStore bs, long start, long end) throws IllegalArgumentException, BufferOverflowException, BufferUnderflowException, IndexOutOfBoundsException
@NotNull default B appendDateMillis(long dateInMillis)
@NotNull default B appendTimeMillis(long timeOfDayInMillis)
@NotNull default B append(@NotNull @NotNull BigDecimal bigDecimal)
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()long addressForWritePosition() throws UnsupportedOperationException, BufferOverflowException
default ByteOrder byteOrder()
@NotNull @NotNull Bytes bytesForRead() throws IllegalStateException
IllegalStateException
@NotNull @NotNull Bytes bytesForWrite() throws IllegalStateException
IllegalStateException
boolean compareAndSwapInt(long offset, int expected, int value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
void testAndSetInt(long offset, int expected, int value)
boolean compareAndSwapLong(long offset, long expected, long value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
default boolean compareAndSwapFloat(long offset, float expected, float value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
default boolean compareAndSwapDouble(long offset, double expected, double value) throws BufferOverflowException
offset
- to perform CASexpected
- valuevalue
- to setBufferOverflowException
boolean sharedMemory()
boolean isDirectMemory()
Copyright © 2020. All rights reserved.