Package hudson.console
Class LineTransformationOutputStream.Delegating
- java.lang.Object
-
- java.io.OutputStream
-
- hudson.console.LineTransformationOutputStream
-
- hudson.console.LineTransformationOutputStream.Delegating
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
MavenConsoleAnnotator
,PlainTextConsoleOutputStream
- Enclosing class:
- LineTransformationOutputStream
public abstract static class LineTransformationOutputStream.Delegating extends LineTransformationOutputStream
Convenience subclass for cases where you wish to process lines being sent to an underlying stream.LineTransformationOutputStream.eol(byte[], int)
will typicallyOutputStream.write(byte[], int, int)
toout
. Flushing or closing the decorated stream will behave properly.- Since:
- 2.173
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.console.LineTransformationOutputStream
LineTransformationOutputStream.Delegating
-
-
Field Summary
Fields Modifier and Type Field Description protected OutputStream
out
-
Constructor Summary
Constructors Modifier Constructor Description protected
Delegating(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
-
Methods inherited from class hudson.console.LineTransformationOutputStream
eol, forceEol, trimEOL, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Field Detail
-
out
protected final OutputStream out
-
-
Constructor Detail
-
Delegating
protected Delegating(OutputStream out)
-
-
Method Detail
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classLineTransformationOutputStream
- Throws:
IOException
-
-