Class IgnoreCloseOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.BufferedOutputStream
com.cloudbees.jenkins.support.util.IgnoreCloseOutputStream
- All Implemented Interfaces:
WrapperOutputStream
,Closeable
,Flushable
,AutoCloseable
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class IgnoreCloseOutputStream
extends BufferedOutputStream
implements WrapperOutputStream
Provides a
BufferedOutputStream
that ignores calls to close its underlying stream and instead simply flushes it.- Since:
- TODO
-
Field Summary
Fields inherited from class java.io.BufferedOutputStream
buf, count
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorDescriptionThe underlying output stream to be filtered. -
Method Summary
Methods inherited from class java.io.BufferedOutputStream
flush, write, write
Methods inherited from class java.io.FilterOutputStream
write
Methods inherited from class java.io.OutputStream
nullOutputStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.cloudbees.jenkins.support.util.WrapperOutputStream
unwrapRecursively
-
Constructor Details
-
IgnoreCloseOutputStream
The underlying output stream to be filtered.- Parameters:
out
- the underlying output stream.
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-
unwrap
Description copied from interface:WrapperOutputStream
Unwraps this stream, potentially forcing unwritten data to be flushed.- Specified by:
unwrap
in interfaceWrapperOutputStream
- Returns:
- the underlying stream being wrapped
-