public class JobOutputStream extends OutputStream
This class is specificaly designed for jobs that generate textual output. Binary data might not be handled correctly.
| Modifier and Type | Field and Description |
|---|---|
protected JobOutputListener |
listener |
| Constructor and Description |
|---|
JobOutputStream(JobOutputListener jobListener)
Creates a job output stream with a specific
job output listener to which the job output
will be redirected to.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Notifies the job output listener that
no more output will be produced.
|
void |
write(byte[] b,
int off,
int len)
Converts the byte array to a string and forwards
it to the job output listener.
|
void |
write(int b)
Converts the int to a string and forwards
it to the job output listener.
|
flush, writeprotected JobOutputListener listener
public JobOutputStream(JobOutputListener jobListener)
jobListener - an instance of the job output
listener. Cannot be null.public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2013. All Rights Reserved.