Class LineOutputStream
java.lang.Object
java.io.OutputStream
org.apache.sshd.common.util.io.output.LineOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
LineLevelAppenderStream
Calls the actual writing method only when LF detected in the written stream. Note: it strips CR if found
before the LF
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
accumulateLineData
(byte[] b, int off, int len) void
close()
protected abstract void
handleLine
(byte[] buf, int offset, int len) void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
Field Details
-
oneByte
protected final byte[] oneByte -
lineBuf
protected byte[] lineBuf -
usedLen
protected int usedLen
-
-
Constructor Details
-
LineOutputStream
protected LineOutputStream()
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
accumulateLineData
- Throws:
IOException
-
handleLine
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-