public class ClosingPipe extends Pipe
Common usage of pipes includes asynchronous zipping of data from two data sources, redirecting output and input to subprocesses and for loggers you want to just pipe from and input source.
com.hypirion.io 0.2.0
Modifier and Type | Field and Description |
---|---|
protected java.lang.Thread |
closer |
DEFAULT_BUFFER_SIZE
Constructor and Description |
---|
ClosingPipe(java.io.InputStream in,
java.io.OutputStream out)
Creates a new closing pipe, which redirects data from the stream
in to the stream out once started. |
ClosingPipe(java.io.InputStream in,
java.io.OutputStream out,
int bufsize)
Creates a new closing pipe with buffer size
bufsize , which
redirects data from the stream in to the stream
out once started. |
ClosingPipe(java.io.Reader in,
java.io.Writer out)
Creates a new closing pipe, which redirects data from the reader
in to the writer out once started. |
ClosingPipe(java.io.Reader in,
java.io.Writer out,
int bufsize)
Creates a new closing pipe with buffer size
bufsize , which
redirects data from the reader in to the writer
out once started. |
public ClosingPipe(java.io.InputStream in, java.io.OutputStream out)
in
to the stream out
once started.in
- the input stream to read from.out
- the output stream to write out to.public ClosingPipe(java.io.InputStream in, java.io.OutputStream out, int bufsize)
bufsize
, which
redirects data from the stream in
to the stream
out
once started.in
- the input stream to read from.out
- the output stream to write out to.bufsize
- the buffer size of the pipe.public ClosingPipe(java.io.Reader in, java.io.Writer out)
in
to the writer out
once started.in
- the reader to read from.out
- the writer to write out to.public ClosingPipe(java.io.Reader in, java.io.Writer out, int bufsize)
bufsize
, which
redirects data from the reader in
to the writer
out
once started.in
- the reader to read from.out
- the writer to write out to.bufsize
- the buffer size of the pipe.