public interface LineLevelAppender extends LineDataConsumer, java.io.Closeable
Modifier and Type | Field and Description |
---|---|
static LineLevelAppender |
EMPTY |
static int |
TYPICAL_LINE_LENGTH
A typical line length used in many textual standards
|
FAIL, IGNORE
Modifier and Type | Method and Description |
---|---|
default void |
consume(java.lang.CharSequence lineData) |
boolean |
isWriteEnabled() |
static LineLevelAppender |
wrap(java.lang.Appendable appendable) |
static LineLevelAppender |
wrap(java.lang.Appendable appendable,
java.util.function.BooleanSupplier writeEnabled) |
void |
writeLineData(java.lang.CharSequence lineData)
Called by the implementation once end-of-line is detected.
|
static final int TYPICAL_LINE_LENGTH
static final LineLevelAppender EMPTY
boolean isWriteEnabled()
true
if OK to accumulate data in work bufferdefault void consume(java.lang.CharSequence lineData) throws java.io.IOException
consume
in interface LineDataConsumer
java.io.IOException
void writeLineData(java.lang.CharSequence lineData) throws java.io.IOException
lineData
- The "pure" line data - excluding any CR/LF(s).java.io.IOException
- If failed to write the datastatic LineLevelAppender wrap(java.lang.Appendable appendable)
static LineLevelAppender wrap(java.lang.Appendable appendable, java.util.function.BooleanSupplier writeEnabled)