Class LastTwoLinesAwareWriter
java.lang.Object
java.io.Writer
org.apache.maven.doxia.module.markdown.LastTwoLinesAwareWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
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.-
Constructor Details
-
LastTwoLinesAwareWriter
-
-
Method Details
-
isWriterAtStartOfNewLine
-
isWriterAfterBlankLine
-
isInBlankLine
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
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
-
isAfterDigit
-