Interface LineLevelAppender
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,LineDataConsumer
public interface LineLevelAppender extends LineDataConsumer, java.io.Closeable
-
-
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(java.lang.CharSequence lineData)booleanisWriteEnabled()static LineLevelAppenderwrap(java.lang.Appendable appendable)static LineLevelAppenderwrap(java.lang.Appendable appendable, java.util.function.BooleanSupplier writeEnabled)voidwriteLineData(java.lang.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(java.lang.CharSequence lineData) throws java.io.IOException- Specified by:
consumein interfaceLineDataConsumer- Throws:
java.io.IOException
-
writeLineData
void writeLineData(java.lang.CharSequence lineData) throws java.io.IOExceptionCalled by the implementation once end-of-line is detected.- Parameters:
lineData- The "pure" line data - excluding any CR/LF(s).- Throws:
java.io.IOException- If failed to write the data
-
wrap
static LineLevelAppender wrap(java.lang.Appendable appendable)
-
wrap
static LineLevelAppender wrap(java.lang.Appendable appendable, java.util.function.BooleanSupplier writeEnabled)
-
-