Interface ByteWriter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Consumer of encoded byte output from
Encoder.
Receives a slice of a reusable buffer. Implementations must consume
or copy the data before returning, as the buffer contents may be
overwritten on the next Encoder.accept(int[]) call.
- Author:
- Ståle W. Pedersen
-
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(byte[] buf, int off, int len) Write bytes from a buffer slice.
-
Method Details
-
write
void write(byte[] buf, int off, int len) Write bytes from a buffer slice.- Parameters:
buf- the byte buffer (may be reused by the caller after this method returns)off- the start offset in the bufferlen- the number of bytes to write
-