private static interface ProcessStream.IOHelper
Modifier and Type | Method and Description |
---|---|
int |
available()
The number of bytes available to be immediately read without
blocking.
|
void |
close()
Close and release any OS resources.
|
int |
read()
Read a character from the current read position in the stream.
|
void |
write(byte[] data)
Write the given byte array to the output destination.
|
void |
write(byte[] data,
int off,
int len)
Write the specified range of bytes from the given byte array to the output stream.
|
void |
write(java.lang.String data)
Write the given string to the output destination.
|
void |
writeCh(char ch)
Write the given character to the output destination.
|
int available() throws java.io.IOException
java.io.IOException
void writeCh(char ch) throws java.io.IOException
ch
- The character to be written.java.io.IOException
void write(java.lang.String data) throws java.io.IOException
data
- The data to be written.java.io.IOException
void write(byte[] data) throws java.io.IOException
data
- The data to be written.java.io.IOException
void write(byte[] data, int off, int len) throws java.io.IOException
data
- The data to be written.off
- Starting offset in data from which to read bytes to be written. Must be
non-negative and < data.length
.len
- Length of data to be written. Must be non-negative and <=
(data.length - offset)
.java.io.IOException
- If an I/O error occurs.int read() throws java.io.IOException
The underlying stream subclass determines the content of the result. Byte oriented streams such as pipes or files will return a byte while readers that generate keystrokes or characters may return a Unicode character.
java.io.IOException
void close() throws java.io.IOException
java.io.IOException