Class ValveInputStream

java.lang.Object
java.io.InputStream
org.keycloak.client.registration.cli.aesh.ValveInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class ValveInputStream extends InputStream
This stream blocks and waits, until there is some stream in the queue. It reads all streams from the queue, and then blocks until it receives more.
  • Constructor Details

    • ValveInputStream

      public ValveInputStream()
  • Method Details

    • read

      public int read() throws IOException
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • 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()