T
- Context type.public class ConsoleAnnotationOutputStream<T> extends LineTransformationOutputStream
ConsoleAnnotator
.LineTransformationOutputStream.Delegating
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<T> |
getConsoleAnnotator() |
forceEol, trimEOL, write, write
write
public ConsoleAnnotationOutputStream(Writer out, ConsoleAnnotator<? super T> ann, T context, Charset charset)
public ConsoleAnnotator<T> 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 LineTransformationOutputStream
in
- 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.IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class LineTransformationOutputStream
IOException
Copyright © 2004–2021. All rights reserved.