Interface Encoder

All Known Implementing Classes:
Base64Encoder, PackBitsEncoder

public interface Encoder
Interface for encoders. An Encoder may be used with an EncoderStream, to perform on-the-fly encoding to an OutputStream.

Important note: Encoder implementations are typically not synchronized.

Version:
$Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/enc/Encoder.java#2 $
Author:
Harald Kuhr
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encode(OutputStream stream, ByteBuffer buffer)
    Encodes up to buffer.remaining() bytes into the given input stream, from the given buffer.
  • Method Details

    • encode

      void encode(OutputStream stream, ByteBuffer buffer) throws IOException
      Encodes up to buffer.remaining() bytes into the given input stream, from the given buffer.
      Parameters:
      stream - the output stream to encode data to
      buffer - buffer to read data from
      Throws:
      IOException - if an I/O error occurs