|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
edu.emory.mathcs.util.io.RedirectingInputStream
Input stream that supports redirecting data directly to an output stream.
TeeInputStream,
ForkOutputStream,
RedirectingReader| Field Summary |
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
RedirectingInputStream(java.io.InputStream in)
Creates a new redirecting input stream that reads from the specified source with default autoflush and autoclose policies and a default buffer size of 2KB. |
|
RedirectingInputStream(java.io.InputStream in,
boolean autoFlush,
boolean autoClose)
Creates a new redirecting input stream that reads from the specified source, has specified autoflush and autoclose policy and a default buffer size of 2KB. |
|
RedirectingInputStream(java.io.InputStream in,
boolean autoFlush,
boolean autoClose,
int buflen)
Creates a new redirecting input stream that reads from the specified source, has specified autoflush and autoclose policy, and a given buffer size. |
|
RedirectingInputStream(java.io.InputStream in,
int buflen)
Creates a new redirecting input stream that reads from the specified source with default autoflush and autoclose policies and a specified buffer size. |
|
| Method Summary | |
int |
redirect(java.io.OutputStream out,
int len)
Reads and redirects up to the len bytes of data to a
specified output stream. |
int |
redirectAll(java.io.OutputStream out)
Readirects all further data from this input into the specified output stream, until EOF. |
| Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.emory.mathcs.util.io.Input |
available, close, mark, markSupported, read, read, read, reset, skip |
| Constructor Detail |
public RedirectingInputStream(java.io.InputStream in)
in - the input to read from
public RedirectingInputStream(java.io.InputStream in,
int buflen)
in - the input to read frombuflen - the maximum chunk size
public RedirectingInputStream(java.io.InputStream in,
boolean autoFlush,
boolean autoClose)
in - the input to read fromautoFlush - decides whether to flush the output after each redirectautoClose - decides whether to close the output upon EOF on input
during redirection
public RedirectingInputStream(java.io.InputStream in,
boolean autoFlush,
boolean autoClose,
int buflen)
in - the input to read fromautoFlush - decides whether to flush the output after each redirectautoClose - decides whether to close the output upon EOF on input
during redirectionbuflen - the maximum chunk size| Method Detail |
public int redirect(java.io.OutputStream out,
int len)
throws java.io.IOException
RedirectibleInputlen bytes of data to a
specified output stream. Returns the number of bytes actually redirected.
redirect in interface RedirectibleInputout - the destination streamlen - the maximum number of bytes to redirect
java.io.IOException - if I/O error occurs
public int redirectAll(java.io.OutputStream out)
throws java.io.IOException
RedirectibleInput
redirectAll in interface RedirectibleInputout - the destination stream
java.io.IOException - if I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||