Class Main.BufferingReader

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

    static class Main.BufferingReader
    extends java.io.FilterReader
    Reader that snoops which characters have been read and saves them in a buffer until flush() is called.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.StringBuilder buf  
      • Fields inherited from class java.io.FilterReader

        in
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BufferingReader​(java.io.Reader in)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String flush()  
      int read()  
      int read​(char[] cbuf, int off, int len)  
      • Methods inherited from class java.io.FilterReader

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

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

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

      • buf

        final java.lang.StringBuilder buf
    • Constructor Detail

      • BufferingReader

        protected BufferingReader​(java.io.Reader in)
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterReader
        Throws:
        java.io.IOException
      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterReader
        Throws:
        java.io.IOException
      • flush

        public java.lang.String flush()