Class AbstractCharDataObjectCodec<T>

    • Field Detail

      • CONTENT_TYPE

        public static final ch.raffael.meldioc.library.codec.ContentType CONTENT_TYPE
      • SOME_CONTENT_TYPE

        public static final io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> SOME_CONTENT_TYPE
    • Constructor Detail

      • AbstractCharDataObjectCodec

        protected AbstractCharDataObjectCodec()
      • AbstractCharDataObjectCodec

        protected AbstractCharDataObjectCodec​(io.vavr.control.Option<java.nio.charset.Charset> charset)
      • AbstractCharDataObjectCodec

        protected AbstractCharDataObjectCodec​(int bufferSize)
      • AbstractCharDataObjectCodec

        protected AbstractCharDataObjectCodec​(int bufferSize,
                                              io.vavr.control.Option<java.nio.charset.Charset> charset)
    • Method Detail

      • decode

        public T decode​(java.io.InputStream stream)
                 throws java.io.IOException
        Specified by:
        decode in interface ObjectDecoder<T>
        Throws:
        java.io.IOException
      • decode

        public T decode​(byte[] data)
                 throws java.io.IOException
        Specified by:
        decode in interface ObjectDecoder<T>
        Throws:
        java.io.IOException
      • encode

        public ch.raffael.meldioc.library.codec.ContentType encode​(T value,
                                                                   java.io.OutputStream target)
                                                            throws java.io.IOException
        Specified by:
        encode in interface ObjectEncoder<T>
        Throws:
        java.io.IOException
      • encode

        public io.vavr.Tuple2<byte[],​ch.raffael.meldioc.library.codec.ContentType> encode​(T value)
                                                                                         throws java.io.IOException
        Specified by:
        encode in interface ObjectEncoder<T>
        Throws:
        java.io.IOException
      • decode

        protected abstract T decode​(java.io.Reader source)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • encode

        protected abstract void encode​(T value,
                                       java.io.Writer target)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • defaultCharset

        protected java.nio.charset.Charset defaultCharset()
      • baseContentType

        protected abstract ch.raffael.meldioc.library.codec.ContentType baseContentType()