public class EchoWriter extends FilterWriter
out
Constructor and Description |
---|
EchoWriter(Writer main)
Creates a writer that will echo to the standard output.
|
EchoWriter(Writer main,
Writer echo)
Creates a copy writter for the specified stream.
|
Modifier and Type | Method and Description |
---|---|
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(String string)
Writes a string.
|
void |
write(String string,
int offset,
int length)
Writes a portion of a string.
|
public EchoWriter(Writer main)
main
- The main stream.public void write(int c) throws IOException
write
in class FilterWriter
c
- The character to write.IOException
- If an I/O error occurs.public void write(char[] cbuf) throws IOException
write
in class Writer
cbuf
- Buffer of characters to be written.IOException
- If an I/O error occurs.public void write(char[] cbuf, int offset, int length) throws IOException
write
in class FilterWriter
cbuf
- Buffer of characters to be written.offset
- Offset from which to start reading characters.length
- Number of characters to be written.IOException
- If an I/O error occurs.public void write(String string) throws IOException
write
in class Writer
string
- String to be written.IOException
- If an I/O error occurs.public void write(String string, int offset, int length) throws IOException
write
in class FilterWriter
string
- String to be written.offset
- Offset from which to start writing characters.length
- Number of characters to write.IOException
- If an I/O error occurs.public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterWriter
IOException
- If an I/O error occurs.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterWriter
IOException
- If an I/O error occurs.Copyright © 1996–2019 Geotools. All rights reserved.