Package jenkins.util
Class MarkFindingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- jenkins.util.MarkFindingOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public abstract class MarkFindingOutputStream extends OutputStream
FilteringOutputStream
that looks forMARK
in the output stream and notifies the callback. The mark itself will be removed from the stream.- Since:
- 1.458
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MarkFindingOutputStream(OutputStream base)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
protected abstract void
onMarkFound()
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Field Detail
-
MARK
public static final String MARK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MarkFindingOutputStream
protected MarkFindingOutputStream(OutputStream base)
-
-
Method Detail
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
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 classOutputStream
- Throws:
IOException
-
onMarkFound
protected abstract void onMarkFound()
-
-