|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.job.AbstractJob<Void>
ch.javasoft.job.PipeJob
public class PipeJob
A PipeJob pipes an input stream to an output stream, i.e. it writes to the output stream what it reads from the input stream, typically in its own thread.
| Constructor Summary | |
|---|---|
PipeJob(InputStream src,
OutputStream dst)
Constructs a new PipeJob with the given streams to pipe, using a buffer of default size (1024 bytes). |
|
PipeJob(InputStream src,
OutputStream dst,
byte[] buffer)
Constructs a new PipeJob with the given streams to pipe, using the given buffer. |
|
| Method Summary | |
|---|---|
static JobMonitor<Void> |
pipe(InputStream src,
OutputStream dst)
Pipe the specified input stream to the output stream. |
static JobMonitor<Void> |
pipe(InputStream src,
OutputStream dst,
byte[] buffer)
Pipe the specified input stream to the output stream. |
Void |
run()
Executes the job, blocks until the result is present or an exception is thrown. |
| Methods inherited from class ch.javasoft.job.AbstractJob |
|---|
exec, exec, execAndWait, execAndWaitThrowException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PipeJob(InputStream src,
OutputStream dst)
src - the input stream to read fromdst - the output stream to write to
public PipeJob(InputStream src,
OutputStream dst,
byte[] buffer)
src - the input stream to read fromdst - the output stream to write tobuffer - the buffer to use when piping input to output| Method Detail |
|---|
public Void run()
throws IOException
JobJobProcessor. Most job
implementations also implement Executable with the more
preferable Executable.exec() and Executable.execAndWait()
methods.
null of type Void for
void methods
IOException
public static JobMonitor<Void> pipe(InputStream src,
OutputStream dst)
src - the input stream from which data is readdst - the output stream to write the data to
public static JobMonitor<Void> pipe(InputStream src,
OutputStream dst,
byte[] buffer)
src - the input stream from which data is readdst - the output stream to write the data tobuffer - the buffer to use when copying from in to out
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||