Class BlockAwareReader

    • Field Detail

      • reader

        private final java.io.Reader reader
      • prefix

        private final char[] prefix
      • suffix

        private final char[] suffix
      • p0

        private final char p0
      • s0

        private final char s0
      • overflowBuffer

        private char[] overflowBuffer
      • overflowBufferLen

        private int overflowBufferLen
      • insideComment

        private boolean insideComment
      • index

        private int index
      • discardFrom

        private int discardFrom
    • Constructor Detail

      • BlockAwareReader

        protected BlockAwareReader​(java.io.Reader reader,
                                   BlockAwareReader.BlockAction action,
                                   char[] prefix,
                                   char[] suffix)
    • Method Detail

      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Specified by:
        read in class java.io.Reader
        Throws:
        java.io.IOException
      • readBytes

        private int readBytes​(char[] buffer,
                              int off,
                              int len)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • overflowLastBytes

        private void overflowLastBytes​(char[] buffer,
                                       int maxi,
                                       int overflowCount)
      • matchOverflow

        private boolean matchOverflow​(char[] structure)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.io.Reader
        Throws:
        java.io.IOException