org.globus.io.gass.server
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.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException