Class MonitorInputReader

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

    public class MonitorInputReader
    extends java.io.BufferedReader
    A BufferedReader decorator that send all that is read via BufferedReader.read() to the attached ParserMonitor before returning the read int.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ParserMonitor monitor  
      • Fields inherited from class java.io.Reader

        lock
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read​(char[] c)
      Currently the only overridden method that sends data to the given monitor.
      • Methods inherited from class java.io.BufferedReader

        close, lines, mark, markSupported, read, read, readLine, ready, reset, skip
      • Methods inherited from class java.io.Reader

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

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

      • MonitorInputReader

        public MonitorInputReader​(java.io.Reader reader,
                                  ParserMonitor monitor)
        Parameters:
        reader - the actual reader
        monitor - the monitor
    • Method Detail

      • read

        public int read​(char[] c)
                 throws java.io.IOException
        Currently the only overridden method that sends data to the given monitor.
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.IOException