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
Modifier and Type | Field and Description |
---|---|
protected LineLevelAppender |
appenderInstance |
protected CharsetDecoder |
csDecoder |
protected char[] |
lineBuf |
oneByte, usedLen
Constructor and Description |
---|
LineLevelAppenderStream(CharsetDecoder decoder,
LineLevelAppender appender) |
LineLevelAppenderStream(Charset charset,
LineLevelAppender appender) |
LineLevelAppenderStream(LineLevelAppender appender) |
LineLevelAppenderStream(String charset,
LineLevelAppender appender) |
Modifier and Type | Method and Description |
---|---|
protected char[] |
ensureCharDataCapacity(int numBytes) |
LineLevelAppender |
getLineLevelAppender() |
protected void |
handleLine(byte[] b,
int off,
int len) |
accumulateLineData, close, write, write, write
flush
protected final CharsetDecoder csDecoder
protected final LineLevelAppender appenderInstance
protected char[] lineBuf
public LineLevelAppenderStream(LineLevelAppender appender)
public LineLevelAppenderStream(String charset, LineLevelAppender appender)
public LineLevelAppenderStream(Charset charset, LineLevelAppender appender)
public LineLevelAppenderStream(CharsetDecoder decoder, LineLevelAppender appender)
public final LineLevelAppender getLineLevelAppender()
protected void handleLine(byte[] b, int off, int len) throws IOException
handleLine
in class LineOutputStream
IOException
protected char[] ensureCharDataCapacity(int numBytes)
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.