public class JobOutputStream
extends java.io.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.
|
protected 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 java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException