Interface Decoder

  • All Known Subinterfaces:
    Codec
    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 Decoder
    Decoder interface that defines method to decode data.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer decode​(java.nio.ByteBuffer data, java.util.Map<java.lang.String,​java.lang.String> codecProperties)
      Implementation should decode the remaining bytes in the buffer and return a new ByteBuffer that includes the decoded data at its current position.
    • Method Detail

      • decode

        java.nio.ByteBuffer decode​(java.nio.ByteBuffer data,
                                   java.util.Map<java.lang.String,​java.lang.String> codecProperties)
                            throws java.io.IOException
        Implementation should decode the remaining bytes in the buffer and return a new ByteBuffer that includes the decoded data at its current position.
        Parameters:
        data - encoded ByteBuffer to decode.
        codecProperties - codec properties.
        Returns:
        decoded ByteBuffer with position set to the start of decoded data.
        Throws:
        java.io.IOException - can be thrown while reading from or writing to byte buffers.