T - Context type.public class ConsoleAnnotationOutputStream<T> extends LineTransformationOutputStream
ConsoleAnnotator.| Constructor and Description |
|---|
ConsoleAnnotationOutputStream(Writer out,
ConsoleAnnotator<? super T> ann,
T context,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
eol(byte[] in,
int sz)
Called after we read the whole line of plain text, which is stored in
LineTransformationOutputStream.buf. |
void |
flush() |
ConsoleAnnotator |
getConsoleAnnotator() |
forceEol, trimEOL, write, writewritepublic ConsoleAnnotationOutputStream(Writer out, ConsoleAnnotator<? super T> ann, T context, Charset charset)
public ConsoleAnnotator getConsoleAnnotator()
protected void eol(byte[] in,
int sz)
throws IOException
LineTransformationOutputStream.buf.
This method performs annotations and send the result to out.eol in class LineTransformationOutputStreamin - Contents of the whole line, including the EOL code like CR/LF.sz - 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 flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class LineTransformationOutputStreamIOExceptionCopyright © 2019. All rights reserved.