Interface EncoderFactory.Encoder<T>

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

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

      • encode

        void encode​(T element)
             throws 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:
        IOException - if fail to encode