public interface ByteCollector
To byte collector you can append bytes.
| Modifier and Type | Method and Description |
|---|---|
default void |
append(byte... bytes)
Append the given byte array to this buffer.
|
void |
append(byte[] bytes,
int offset,
int length)
Append the given byte array part to this buffer.
|
void |
append(int value)
Append one byte
|
void |
clear()
Clear all data.
|
long |
getNumberOfCollectedBytes()
Get the total number of bytes appended to this buffer.
|
void append(int value)
value - byte value. Accepts integer for convenience, but will cast the given value to byte.default void append(@NotNull byte... bytes)
bytes - bytes to appendvoid append(@NotNull byte[] bytes, int offset, int length)
bytes - basic byte arrayoffset - start offset of the bytes to appendlength - number of bytes to appendjava.lang.IndexOutOfBoundsException - if the parameters define a part which is at least partially outside the bytesvoid clear()
the total number of bytes handled by this buffer.long getNumberOfCollectedBytes()