Class BufferingStackWriter

java.lang.Object
java.io.Writer
org.apache.maven.doxia.module.markdown.BufferingStackWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class BufferingStackWriter extends Writer
  • Constructor Details

  • Method Details

    • write

      public void write(char[] cbuf, int off, int len) throws IOException
      Specified by:
      write in class Writer
      Throws:
      IOException
    • addBuffer

      public void addBuffer()
      Adds another buffer to the stack. The content of the current buffer is not affected, but the new content will be written to the new buffer until it is polled.
    • getCurrentBuffer

      Retrieves the content of the current buffer without removing it from the stack. Also writing to the StringBuffer returned by this method will affect the content of the current buffer.
    • getAndClearCurrentBuffer

      Retrieves the content of the current buffer without removing it from the stack. In contrast to getCurrentBuffer() the current buffer is cleared.
    • removeBuffer

      public void removeBuffer()
      Remove the current buffer from the stack. The content of the current buffer is discarded. The previous buffer in the stack becomes the current buffer.
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in class Writer
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class Writer
      Throws:
      IOException