Interface LineLevelAppender
-
- All Superinterfaces:
AutoCloseable,Closeable,LineDataConsumer
public interface LineLevelAppender extends LineDataConsumer, Closeable
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static LineLevelAppenderEMPTYstatic intTYPICAL_LINE_LENGTHA typical line length used in many textual standards-
Fields inherited from interface org.apache.sshd.common.util.io.LineDataConsumer
FAIL, IGNORE
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidconsume(CharSequence lineData)booleanisWriteEnabled()static LineLevelAppenderwrap(Appendable appendable)static LineLevelAppenderwrap(Appendable appendable, BooleanSupplier writeEnabled)voidwriteLineData(CharSequence lineData)Called by the implementation once end-of-line is detected.
-
-
-
Field Detail
-
TYPICAL_LINE_LENGTH
static final int TYPICAL_LINE_LENGTH
A typical line length used in many textual standards- See Also:
- Constant Field Values
-
EMPTY
static final LineLevelAppender EMPTY
-
-
Method Detail
-
isWriteEnabled
boolean isWriteEnabled()
- Returns:
trueif OK to accumulate data in work buffer
-
consume
default void consume(CharSequence lineData) throws IOException
- Specified by:
consumein interfaceLineDataConsumer- Throws:
IOException
-
writeLineData
void writeLineData(CharSequence lineData) throws IOException
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
static LineLevelAppender wrap(Appendable appendable)
-
wrap
static LineLevelAppender wrap(Appendable appendable, BooleanSupplier writeEnabled)
-
-