public class StandardOutputStream extends OutputStream implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
StandardOutputStream.Target
The target for the the output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
Path |
getStdoutPath()
The path to the file where the data was written.
|
StandardOutputStream.Target |
getTarget()
The target the data was written to.
|
static StandardOutputStream |
parse(String stdout,
boolean discardNone)
Parses the string and attempts to determine where the data for the stream should be written.
|
String |
toString() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public static StandardOutputStream parse(String stdout, boolean discardNone) throws IOException
none indicates the data for this stream will be consumed and toString() will return the
data of the discardNone parameter is false, otherwise the data will be discardedSystem.out or System.err to write to the respective streamstdout - the value to be parseddiscardNone - true if the stdout value is none and the data should be discarded,
otherwise the data will be consumed if the stdout value is none and will be
available via toString()IOException - if there is an error creating the streampublic Path getStdoutPath()
null if the data was not written to a file.public StandardOutputStream.Target getTarget()
public void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.