Interface TextWriter
-
- All Known Implementing Classes:
AsynchronousTextWriter
,RotatableWriter
,TextWriter.Stream
,TextWriterAdapter
public interface TextWriter
A TextWriter provides a character-based stream which can be queried for number of bytes written.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TextWriter.Stream
A TextWriter implementation which writes to a given output stream.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
flush()
Flushes any buffered contents of the output stream.long
getBytesWritten()
Retrieves the number of bytes written by this writer.void
shutdown()
Releases any resources held by the writer.void
write(String text)
Writes some text to the output stream.
-
-
-
Method Detail
-
write
void write(String text) throws IOException
Writes some text to the output stream.- Parameters:
text
- The text to write- Throws:
IOException
- If a problem occurs.
-
flush
void flush() throws IOException
Flushes any buffered contents of the output stream.- Throws:
IOException
- If a problem occurs.
-
shutdown
void shutdown()
Releases any resources held by the writer.
-
getBytesWritten
long getBytesWritten()
Retrieves the number of bytes written by this writer.- Returns:
- the number of bytes written by this writer.
-
-