|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
java.io.FilterReader
edu.emory.mathcs.util.io.RedirectingReader
Reader that supports redirecting data directly to a writer.
RedirectingInputStream| Field Summary |
| Fields inherited from class java.io.FilterReader |
in |
| Fields inherited from class java.io.Reader |
lock |
| Constructor Summary | |
RedirectingReader(java.io.Reader in)
Creates a new redirecting reader that reads from the specified source with default autoflush and autoclose policies and a default buffer size of 2KB. |
|
RedirectingReader(java.io.Reader in,
boolean autoFlush,
boolean autoClose)
Creates a new redirecting reader that reads from the specified source, has specified autoflush and autoclose policy and a default buffer size of 2KB. |
|
RedirectingReader(java.io.Reader in,
boolean autoFlush,
boolean autoClose,
int len)
Creates a new redirecting reader that reads from the specified source, has specified autoflush and autoclose policy, and a given buffer size. |
|
RedirectingReader(java.io.Reader in,
int len)
Creates a new redirecting reader that reads from the specified source with default autoflush and autoclose policies and a specified buffer size. |
|
| Method Summary | |
int |
redirect(java.io.Writer out,
int len)
Reads and redirects up to the len characters to a
specified writer. |
int |
redirectAll(java.io.Writer out)
Readirects all further data from this reader into the specified writer, until EOF. |
| Methods inherited from class java.io.FilterReader |
close, mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.io.Reader |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RedirectingReader(java.io.Reader in)
in - the input to read from
public RedirectingReader(java.io.Reader in,
int len)
in - the input to read fromlen - the maximum chunk size
public RedirectingReader(java.io.Reader 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 RedirectingReader(java.io.Reader in,
boolean autoFlush,
boolean autoClose,
int len)
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 redirectionlen - the maximum chunk size| Method Detail |
public int redirect(java.io.Writer out,
int len)
throws java.io.IOException
RedirectibleReaderlen characters to a
specified writer. Returns the number of characters actually redirected.
redirect in interface RedirectibleReaderout - the destination writerlen - the maximum number of characters to redirect
java.io.IOException - if I/O error occurs
public int redirectAll(java.io.Writer out)
throws java.io.IOException
RedirectibleReader
redirectAll in interface RedirectibleReaderout - the destination writer
java.io.IOException - if I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||