public class ExtraDotOutputStream extends CRLFOutputStream
LAST_WAS_CR, LAST_WAS_LF, LAST_WAS_OTHER, startOfLine, statusLast
out
Constructor and Description |
---|
ExtraDotOutputStream(OutputStream out)
Constructor that wraps an OutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
write(int b)
Writes a byte to the stream, adding dots where appropriate.
|
protected void |
writeChunk(byte[] buffer,
int offset,
int length)
Overrides super writeChunk in order to add a "." if the previous chunk ended with
a new line and a new chunk starts with "."
|
checkCRLFTerminator, write
close, flush, write
public ExtraDotOutputStream(OutputStream out)
out
- the OutputStream to be wrappedprotected void writeChunk(byte[] buffer, int offset, int length) throws IOException
writeChunk
in class CRLFOutputStream
IOException
CRLFOutputStream.writeChunk(byte[], int, int)
public void write(int b) throws IOException
write
in class CRLFOutputStream
b
- the byte to writeIOException
- if an error occurs writing the byteCopyright © 2006–2018. All rights reserved.