public interface BytesPrepender<B extends BytesPrepender<B>>
Modifier and Type | Method and Description |
---|---|
B |
clearAndPad(long length)
Clear a buffer, with a given padding to allow for prepending later.
|
default B |
prepend(long value)
Prepends a long in decimal, this method moves the readPosition() backwards.
|
B |
prewrite(byte[] bytes)
Write backward in binary a byte
|
B |
prewrite(BytesStore bytes)
Write backward in binary a byte
|
B |
prewriteByte(byte b)
Write backward in binary a byte
|
B |
prewriteInt(int i)
Write backward in binary a 4 byte int
|
B |
prewriteLong(long l)
Write backward in binary an 8 byte long
|
B |
prewriteShort(short i)
Write backward in binary a 2 byte int
|
@NotNull B clearAndPad(long length) throws BufferOverflowException, IllegalStateException
length
- to padBufferOverflowException
- if the length > capacity() - start()IllegalStateException
@NotNull default B prepend(long value) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
value
- to prepend as text.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
IllegalStateException
@NotNull B prewrite(byte[] bytes) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
bytes
- to prepend to.BufferOverflowException
IllegalStateException
@NotNull B prewrite(BytesStore bytes) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
bytes
- to prepend to.BufferOverflowException
IllegalStateException
@NotNull B prewriteByte(byte b) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
b
- byte to prepend to.BufferOverflowException
IllegalStateException
@NotNull B prewriteShort(short i) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
i
- short to prepend to.BufferOverflowException
IllegalStateException
@NotNull B prewriteInt(int i) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
i
- integer to prepend to.BufferOverflowException
IllegalStateException
@NotNull B prewriteLong(long l) throws BufferOverflowException, IllegalStateException
Note: it moves the readPosition not the writePosition / readLimit
l
- long to prepend to.BufferOverflowException
IllegalStateException
Copyright © 2021. All rights reserved.