Class ConsoleReaderInputStream

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

    class ConsoleReaderInputStream
    extends java.io.SequenceInputStream
    An InputStream implementation that wraps a ConsoleReader. It is useful for setting up the System.in for a generic console.
    Since:
    2.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.io.InputStream systemIn  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void restoreIn()
      Restore the original System.in input stream.
      static void setIn()  
      static void setIn​(ConsoleReader reader)  
      • Methods inherited from class java.io.SequenceInputStream

        available, close, read, read
      • Methods inherited from class java.io.InputStream

        mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • systemIn

        private static java.io.InputStream systemIn
    • Constructor Detail

      • ConsoleReaderInputStream

        public ConsoleReaderInputStream​(ConsoleReader reader)
    • Method Detail

      • setIn

        public static void setIn()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • restoreIn

        public static void restoreIn()
        Restore the original System.in input stream.