Interface EncoderFactory.Encoder<T>

  • Type Parameters:
    T - element type.
    All Superinterfaces:
    java.io.Serializable
    Enclosing interface:
    EncoderFactory<T>

    public static interface EncoderFactory.Encoder<T>
    extends java.io.Serializable
    Interface of Encoder.
    • Method Detail

      • encode

        void encode​(T element)
             throws java.io.IOException
        Encodes the given value onto the specified output stream. It has to be able to encode the given stream consequently by calling this method repeatedly. Because the user can want to keep a single output stream and continuously concatenate elements, the output stream should not be closed.
        Parameters:
        element - the element to be encoded
        Throws:
        java.io.IOException - if fail to encode