Class StreamingEncoderEncodedAppender

  • All Implemented Interfaces:
    EncodedAppender

    public class StreamingEncoderEncodedAppender
    extends AbstractEncodedAppender
    EncodedAppender implementation used for piping / chaining several StreamingEncoders
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from interface: EncodedAppender
        Flush the internal buffer and write the buffered input to a possible destination.
        Specified by:
        flush in interface EncodedAppender
        Overrides:
        flush in class AbstractEncodedAppender
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • write

        protected void write​(EncodingState encodingState,
                             char[] b,
                             int off,
                             int len)
                      throws java.io.IOException
        Description copied from class: AbstractEncodedAppender
        Append a portion of a char array to the buffer and attach the encodingState information to it
        Specified by:
        write in class AbstractEncodedAppender
        Parameters:
        encodingState - the new encoding state of the char array
        b - a char array
        off - Offset from which to start encoding characters
        len - Number of characters to encode
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • write

        protected void write​(EncodingState encodingState,
                             java.lang.String str,
                             int off,
                             int len)
                      throws java.io.IOException
        Description copied from class: AbstractEncodedAppender
        Append a portion of a string to the buffer and attach the encodingState information to it
        Specified by:
        write in class AbstractEncodedAppender
        Parameters:
        encodingState - the new encoding state of the string
        str - A String
        off - Offset from which to start encoding characters
        len - Number of characters to encode
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • appendCharSequence

        protected void appendCharSequence​(EncodingState encodingState,
                                          java.lang.CharSequence str,
                                          int start,
                                          int end)
                                   throws java.io.IOException
        Description copied from class: AbstractEncodedAppender
        Append a portion of a CharSequence to the buffer and attach the encodingState information to it
        Specified by:
        appendCharSequence in class AbstractEncodedAppender
        Parameters:
        encodingState - the new encoding state of the CharSequence portion
        str - a CharSequence
        start - the start index, inclusive
        end - the end index, exclusive
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.