| java.lang.Object java.io.Writer java.io.FilterWriter org.geotools.io.EchoWriter
EchoWriter | public class EchoWriter extends FilterWriter (Code) | | A writer that copy all output to an other stream. This writer can be used for perfoming
an exact copy of what is sent to an other writer. For example, it may be used for echoing
to the standard output the content sent to a file. This writer is usefull for debugging
purpose.
version: $Id: EchoWriter.java 23632 2006-12-29 22:13:51Z desruisseaux $ author: Martin Desruisseaux since: 2.1 |
Method Summary | |
public void | close() Close the main stream, If this object has been constructed with the
(i.e.
if the echo stream is the
),
then the echo stream will not be closed. | public void | flush() Flush both streams. | public void | write(int c) Write a single character. | public void | write(char[] cbuf) Write an array of characters. | public void | write(char[] cbuf, int off, int len) Write a portion of an array of characters. | public void | write(String str) Write a string. | public void | write(String str, int off, int len) Write a portion of a string. |
EchoWriter | public EchoWriter(Writer main)(Code) | | Creates a writer that will echo to the
.
Each line to that standard output will be
.
Parameters: main - The main stream. |
EchoWriter | public EchoWriter(Writer main, Writer echo)(Code) | | Creates a copy writter for the specified stream.
Parameters: main - The main stream. Parameters: echo - The echo stream. |
close | public void close() throws IOException(Code) | | Close the main stream, If this object has been constructed with the
(i.e.
if the echo stream is the
),
then the echo stream will not be closed. Otherwise it will be closed too.
throws: IOException - If an I/O error occurs |
write | public void write(char[] cbuf) throws IOException(Code) | | Write an array of characters.
Parameters: cbuf - Buffer of characters to be written throws: IOException - If an I/O error occurs |
write | public void write(char[] cbuf, int off, int len) throws IOException(Code) | | Write a portion of an array of characters.
Parameters: cbuf - Buffer of characters to be written Parameters: off - Offset from which to start reading characters Parameters: len - Number of characters to be written throws: IOException - If an I/O error occurs |
write | public void write(String str, int off, int len) throws IOException(Code) | | Write a portion of a string.
Parameters: str - A String Parameters: off - Offset from which to start writing characters Parameters: len - Number of characters to write throws: IOException - If an I/O error occurs |
|
|