B - self typepublic interface BytesPrepender<B extends BytesPrepender<B>>
RandomCommon.readPosition().
After each operation the read position moves backwards.| Modifier and Type | Method and Description |
|---|---|
B |
clearAndPad(long length)
Clears the buffer then advances both cursors by
length bytes so
data can be prepended later. |
default B |
prepend(long value)
Prepends a long value as a decimal text.
|
B |
prewrite(byte[] bytes)
Writes a byte array backward in binary format.
|
B |
prewrite(BytesStore<?,?> bytes)
Writes a BytesStore instance backward in binary format.
|
B |
prewriteByte(byte b)
Writes a byte backward in binary format.
|
B |
prewriteInt(int i)
Writes an int (4-byte int) backward in binary format.
|
B |
prewriteLong(long l)
Writes a long (8-byte int) backward in binary format.
|
B |
prewriteShort(short i)
Writes a short (2-byte int) backward in binary format.
|
@NotNull B clearAndPad(long length) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
length bytes so
data can be prepended later.BufferOverflowExceptionnet.openhft.chronicle.core.io.ClosedIllegalStateExceptionnet.openhft.chronicle.core.io.ThreadingIllegalStateException@NotNull default B prepend(long value) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
Note: The operation shifts the readPosition, but not the writePosition or readLimit
value - the long value to prepend as textBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way@NotNull B prewrite(byte[] bytes) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
bytes - the byte array to prependBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull B prewrite(BytesStore<?,?> bytes) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
bytes - the BytesStore to prependBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull B prewriteByte(byte b) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
b - the byte to prependBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull B prewriteShort(short i) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
i - the short to prependBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull B prewriteInt(int i) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
i - the int to prependBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.@NotNull B prewriteLong(long l) throws BufferOverflowException, net.openhft.chronicle.core.io.ClosedIllegalStateException, net.openhft.chronicle.core.io.ThreadingIllegalStateException
l - the long to prependBufferOverflowException - If the capacity of the underlying buffer was exceedednet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe way.Copyright © 2026 Chronicle Software Ltd. All rights reserved.