Package hudson.console
Class ConsoleAnnotationOutputStream<T>
java.lang.Object
java.io.OutputStream
hudson.console.LineTransformationOutputStream
hudson.console.ConsoleAnnotationOutputStream<T>
- Type Parameters:
- T- Context type.
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
Used to convert plain text console output (as byte sequence) + embedded annotations into HTML (as char sequence),
 by using 
ConsoleAnnotator.- Since:
- 1.349
- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested classes/interfaces inherited from class hudson.console.LineTransformationOutputStreamLineTransformationOutputStream.Delegating
- 
Constructor SummaryConstructorsConstructorDescriptionConsoleAnnotationOutputStream(Writer out, ConsoleAnnotator<? super T> ann, T context, Charset charset) 
- 
Method SummaryMethods inherited from class hudson.console.LineTransformationOutputStreamforceEol, trimEOL, write, writeMethods inherited from class java.io.OutputStreamnullOutputStream, write
- 
Constructor Details- 
ConsoleAnnotationOutputStreampublic ConsoleAnnotationOutputStream(Writer out, ConsoleAnnotator<? super T> ann, T context, Charset charset) 
 
- 
- 
Method Details- 
getConsoleAnnotator
- 
eolCalled after we read the whole line of plain text, which is stored inLineTransformationOutputStream.buf. This method performs annotations and send the result toout.- Specified by:
- eolin class- LineTransformationOutputStream
- Parameters:
- 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.
- Throws:
- IOException
 
- 
flush- Specified by:
- flushin interface- Flushable
- Overrides:
- flushin class- OutputStream
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- LineTransformationOutputStream
- Throws:
- IOException
 
 
-