Class LineReader

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

    class LineReader
    extends java.io.Reader
    A simple Reader implementation to enable parsers to process lines on demand, via AbstractParser.parseLine(String)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int length  
      private java.lang.String line  
      private int next  
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      LineReader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean markSupported()  
      int read​(char[] cbuf, int off, int len)  
      boolean ready()  
      void setLine​(java.lang.String line)  
      long skip​(long ns)  
      • Methods inherited from class java.io.Reader

        mark, nullReader, read, read, read, reset, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • line

        private java.lang.String line
      • length

        private int length
      • next

        private int next
    • Constructor Detail

      • LineReader

        public LineReader()
    • Method Detail

      • setLine

        public void setLine​(java.lang.String line)
      • read

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

        public long skip​(long ns)
        Overrides:
        skip in class java.io.Reader
      • ready

        public boolean ready()
        Overrides:
        ready in class java.io.Reader
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.Reader
      • close

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