Class LineLevelAppenderStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.sshd.common.util.io.output.LineOutputStream
-
- org.apache.sshd.common.util.io.output.LineLevelAppenderStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class LineLevelAppenderStream extends LineOutputStream
Accumulates all written data into a work buffer and calls the actual writing method only when LF detected. Note: it strips CR if found before the LF
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description protected LineLevelAppenderappenderInstanceprotected CharsetDecodercsDecoderprotected char[]lineBuf-
Fields inherited from class org.apache.sshd.common.util.io.output.LineOutputStream
oneByte, usedLen
-
-
Constructor Summary
Constructors Constructor Description LineLevelAppenderStream(String charset, LineLevelAppender appender)LineLevelAppenderStream(CharsetDecoder decoder, LineLevelAppender appender)LineLevelAppenderStream(Charset charset, LineLevelAppender appender)LineLevelAppenderStream(LineLevelAppender appender)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected char[]ensureCharDataCapacity(int numBytes)LineLevelAppendergetLineLevelAppender()protected voidhandleLine(byte[] b, int off, int len)-
Methods inherited from class org.apache.sshd.common.util.io.output.LineOutputStream
accumulateLineData, close, write, write, write
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Field Detail
-
csDecoder
protected final CharsetDecoder csDecoder
-
appenderInstance
protected final LineLevelAppender appenderInstance
-
lineBuf
protected char[] lineBuf
-
-
Constructor Detail
-
LineLevelAppenderStream
public LineLevelAppenderStream(LineLevelAppender appender)
-
LineLevelAppenderStream
public LineLevelAppenderStream(String charset, LineLevelAppender appender)
-
LineLevelAppenderStream
public LineLevelAppenderStream(Charset charset, LineLevelAppender appender)
-
LineLevelAppenderStream
public LineLevelAppenderStream(CharsetDecoder decoder, LineLevelAppender appender)
-
-
Method Detail
-
getLineLevelAppender
public final LineLevelAppender getLineLevelAppender()
-
handleLine
protected void handleLine(byte[] b, int off, int len) throws IOException- Specified by:
handleLinein classLineOutputStream- Throws:
IOException
-
ensureCharDataCapacity
protected char[] ensureCharDataCapacity(int numBytes)
-
-