Class BufferingStackWriter
java.lang.Object
java.io.Writer
org.apache.maven.doxia.module.markdown.BufferingStackWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds another buffer to the stack.voidclose()voidflush()Retrieves the content of the current buffer without removing it from the stack.Retrieves the content of the current buffer without removing it from the stack.voidRemove the current buffer from the stack.voidwrite(char[] cbuf, int off, int len)
-
Constructor Details
-
BufferingStackWriter
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
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 togetCurrentBuffer()the current buffer is cleared. -
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
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-