Class LineLevelAppenderStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class LineLevelAppenderStream
    extends LineOutputStream

    Accumulates all written data into a work buffer and calls the actual writing method only when LF detected. Note: it strips CR if found before the LF

    • Field Detail

      • csDecoder

        protected final java.nio.charset.CharsetDecoder csDecoder
      • lineBuf

        protected char[] lineBuf
    • Constructor Detail

      • LineLevelAppenderStream

        public LineLevelAppenderStream​(LineLevelAppender appender)
      • LineLevelAppenderStream

        public LineLevelAppenderStream​(java.lang.String charset,
                                       LineLevelAppender appender)
      • LineLevelAppenderStream

        public LineLevelAppenderStream​(java.nio.charset.Charset charset,
                                       LineLevelAppender appender)
      • LineLevelAppenderStream

        public LineLevelAppenderStream​(java.nio.charset.CharsetDecoder decoder,
                                       LineLevelAppender appender)
    • Method Detail

      • handleLine

        protected void handleLine​(byte[] b,
                                  int off,
                                  int len)
                           throws java.io.IOException
        Specified by:
        handleLine in class LineOutputStream
        Throws:
        java.io.IOException
      • ensureCharDataCapacity

        protected char[] ensureCharDataCapacity​(int numBytes)