|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.FilterWriter
org.geotools.io.EchoWriter
public class EchoWriter
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.
Field Summary |
---|
Fields inherited from class java.io.FilterWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
EchoWriter(java.io.Writer main)
Creates a writer that will echo to the standard output. |
|
EchoWriter(java.io.Writer main,
java.io.Writer echo)
Creates a copy writter for the specified stream. |
Method Summary | |
---|---|
void |
close()
Closes the main stream and the echo stream. |
void |
flush()
Flushs both streams. |
void |
write(char[] cbuf)
Writes an array of characters. |
void |
write(char[] cbuf,
int offset,
int length)
Writes a portion of an array of characters. |
void |
write(int c)
Writes a single character. |
void |
write(java.lang.String string)
Writes a string. |
void |
write(java.lang.String string,
int offset,
int length)
Writes a portion of a string. |
Methods inherited from class java.io.Writer |
---|
append, append, append |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EchoWriter(java.io.Writer main)
main
- The main stream.public EchoWriter(java.io.Writer main, java.io.Writer echo)
main
- The main stream.echo
- The echo stream.Method Detail |
---|
public void write(int c) throws java.io.IOException
write
in class java.io.FilterWriter
c
- The character to write.
java.io.IOException
- If an I/O error occurs.public void write(char[] cbuf) throws java.io.IOException
write
in class java.io.Writer
cbuf
- Buffer of characters to be written.
java.io.IOException
- If an I/O error occurs.public void write(char[] cbuf, int offset, int length) throws java.io.IOException
write
in class java.io.FilterWriter
cbuf
- Buffer of characters to be written.offset
- Offset from which to start reading characters.length
- Number of characters to be written.
java.io.IOException
- If an I/O error occurs.public void write(java.lang.String string) throws java.io.IOException
write
in class java.io.Writer
string
- String to be written.
java.io.IOException
- If an I/O error occurs.public void write(java.lang.String string, int offset, int length) throws java.io.IOException
write
in class java.io.FilterWriter
string
- String to be written.offset
- Offset from which to start writing characters.length
- Number of characters to write.
java.io.IOException
- If an I/O error occurs.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterWriter
java.io.IOException
- If an I/O error occurs.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterWriter
java.io.IOException
- If an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |