public final class ExtraDotOutputStream extends FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected static int |
LAST_WAS_CR |
protected static int |
LAST_WAS_LF |
protected static int |
LAST_WAS_OTHER |
protected boolean |
startOfLine |
protected int |
statusLast
Counter for number of last (0A or 0D).
|
out| Constructor and Description |
|---|
ExtraDotOutputStream(OutputStream out)
Constructor that wraps an OutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] buffer,
int offset,
int length) |
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 "."
|
close, flush, writeprotected int statusLast
protected static final int LAST_WAS_OTHER
protected static final int LAST_WAS_CR
protected static final int LAST_WAS_LF
protected boolean startOfLine
public ExtraDotOutputStream(OutputStream out)
out - the OutputStream to be wrappedprotected void writeChunk(byte[] buffer,
int offset,
int length)
throws IOException
IOExceptionCRLFOutputStream.writeChunk(byte[], int, int)public void write(int b)
throws IOException
b - the byte to writeIOException - if an error occurs writing the bytepublic void write(byte[] buffer,
int offset,
int length)
throws IOException
write in class FilterOutputStreamIOExceptionFilterOutputStream.write(byte[], int, int)Copyright © 2006–2024. All rights reserved.