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.

@FunctionalInterface public interface ByteWriter
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 Type
    Method
    Description
    void
    write(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 buffer
      len - the number of bytes to write