Class TextLineDecoder.Context

  • Enclosing class:
    TextLineDecoder

    private class TextLineDecoder.Context
    extends java.lang.Object
    A Context used during the decoding of a lin. It stores the decoder, the temporary buffer containing the decoded line, and other status flags.
    Version:
    $Rev$, $Date$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private IoBuffer buf
      The temporary buffer containing the decoded line
      private java.nio.charset.CharsetDecoder decoder
      The decoder
      private int matchCount
      The number of lines found so far
      private int overflowPosition
      A counter to signal that the line is too long
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Context​(int bufferLength)
      Create a new Context object with a default buffer
    • Field Detail

      • decoder

        private final java.nio.charset.CharsetDecoder decoder
        The decoder
      • buf

        private final IoBuffer buf
        The temporary buffer containing the decoded line
      • matchCount

        private int matchCount
        The number of lines found so far
      • overflowPosition

        private int overflowPosition
        A counter to signal that the line is too long
    • Constructor Detail

      • Context

        private Context​(int bufferLength)
        Create a new Context object with a default buffer
    • Method Detail

      • getDecoder

        public java.nio.charset.CharsetDecoder getDecoder()
      • getBuffer

        public IoBuffer getBuffer()
      • getOverflowPosition

        public int getOverflowPosition()
      • getMatchCount

        public int getMatchCount()
      • setMatchCount

        public void setMatchCount​(int matchCount)
      • reset

        public void reset()
      • append

        public void append​(IoBuffer in)
      • discard

        private void discard​(IoBuffer in)