Class ValveInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class ValveInputStream
    extends InputStream
    This stream blocks and waits, until there is a stream in the queue. It reads the stream to the end, then stops Aesh console.
    Author:
    Marko Strukelj
    • Constructor Detail

      • ValveInputStream

        public ValveInputStream()
    • Method Detail

      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws IOException
        For some reason AeshInputStream wants to do blocking read of whole buffers, which for stdin results in blocked input.
        Overrides:
        read in class InputStream
        Throws:
        IOException
      • setInputStream

        public void setInputStream​(InputStream is)
      • setConsole

        public void setConsole​(org.jboss.aesh.console.AeshConsoleImpl console)
      • isStdinAvailable

        public boolean isStdinAvailable()