Interface LineLevelAppender
- All Superinterfaces:
AutoCloseable, Closeable, LineDataConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LineLevelAppenderstatic final intA typical line length used in many textual standardsFields inherited from interface LineDataConsumer
FAIL, IGNORE -
Method Summary
Modifier and TypeMethodDescriptiondefault voidconsume(CharSequence lineData) booleanstatic LineLevelAppenderwrap(Appendable appendable) static LineLevelAppenderwrap(Appendable appendable, BooleanSupplier writeEnabled) voidwriteLineData(CharSequence lineData) Called by the implementation once end-of-line is detected.
-
Field Details
-
TYPICAL_LINE_LENGTH
static final int TYPICAL_LINE_LENGTHA typical line length used in many textual standards- See Also:
-
EMPTY
-
-
Method Details
-
isWriteEnabled
boolean isWriteEnabled()- Returns:
trueif OK to accumulate data in work buffer
-
consume
- Specified by:
consumein interfaceLineDataConsumer- Throws:
IOException
-
writeLineData
Called by the implementation once end-of-line is detected.- Parameters:
lineData- The "pure" line data - excluding any CR/LF(s).- Throws:
IOException- If failed to write the data
-
wrap
-
wrap
-