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 
    A TextWriter implementation which writes to a given output stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Flushes any buffered contents of the output stream.
    long
    Retrieves the number of bytes written by this writer.
    void
    Releases any resources held by the writer.
    void
    write(String text)
    Writes some text to the output stream.
  • Method Details

    • 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.