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, write
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 IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2016. All rights reserved.