Interface ByteArrayEncoder<T>

  • Type Parameters:
    T - The encoded item data type
    All Known Subinterfaces:
    ByteArrayCodec<T>
    All Known Implementing Classes:
    DelegatingByteArrayCodec

    public interface ByteArrayEncoder<T>
    A functional interface for encoders producing byte arrays representing single items. In contract to ItemEncoder, this encoder should always be stateless, and is suitable for cases where the encoded form is required to be a byte array, whose bytes represent a single item.
    Author:
    Eyal Schneider
    • Method Detail

      • encode

        byte[] encode​(T item)
        Parameters:
        item - The item to encode
        Returns:
        The encoded item, as byte array