Class LastTwoLinesAwareWriter

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

public class LastTwoLinesAwareWriter extends Writer
Decorates an existing writer to additionally temporarily buffer the last two lines written. Useful to collapse subsequent new lines or blank lines by evaluating isWriterAfterBlankLine() and isWriterAfterBlankLine(). The buffering does not affect or defer delegation to the underlying writer, though.