Class ScriptConsole.BlockingPipedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.PipedInputStream
-
- cern.accsoft.steering.util.gui.script.ScriptConsole.BlockingPipedInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- ScriptConsole
public static class ScriptConsole.BlockingPipedInputStream extends java.io.PipedInputStream
The overridden read method in this class will not throw "Broken pipe" IOExceptions; It will simply wait for new writers and data. This is used by the JConsole internal read thread to allow writers in different (and in particular ephemeral) threads to write to the pipe. It also checks a little more frequently than the original read(). Warning: read() will not even error on a read to an explicitly closed pipe (override closed to for that).
-
-
Constructor Summary
Constructors Constructor Description BlockingPipedInputStream(java.io.PipedOutputStream pout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
read()
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.io.PipedInputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.PipedInputStream
- Throws:
java.io.IOException
-
-