public abstract class LineTransformationOutputStream extends OutputStream
OutputStream that buffers text by line, so that the derived class
can perform some manipulation based on the contents of the whole line.
TODO: Mac is supposed to be CR-only. This class needs to handle that.| Constructor and Description |
|---|
LineTransformationOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
eol(byte[] b,
int len)
Called for each end of the line.
|
void |
forceEol()
Forces the EOL behavior.
|
protected String |
trimEOL(String line) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush, writeprotected abstract void eol(byte[] b,
int len)
throws IOException
b - Contents of the whole line, including the EOL code like CR/LF.len - Specifies the length of the valid contents in 'b'. The rest is garbage.
This is so that the caller doesn't have to allocate an array of the exact size.IOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void forceEol()
throws IOException
IOExceptionCopyright © 2019. All rights reserved.