public class InputStreamMonitor
extends java.lang.Object
Constructor and Description |
---|
InputStreamMonitor(java.io.OutputStream stream)
Creates an input stream monitor which writes to system in via the given output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all communications between this
monitor and the underlying stream.
|
void |
closeInputStream()
Closes the output stream attached to the standard input stream of this
monitor's process.
|
void |
startMonitoring()
Starts a thread which writes the stream.
|
void |
write(java.lang.String text)
Appends the given text to the stream, or
queues the text to be written at a later time
if the stream is blocked.
|
public InputStreamMonitor(java.io.OutputStream stream)
stream
- output streampublic void write(java.lang.String text)
text
- text to appendpublic void startMonitoring()
public void close()
public void closeInputStream() throws java.io.IOException
java.io.IOException
- if an exception occurs closing the input stream