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, countFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionThe underlying output stream to be filtered. -
Method Summary
Methods inherited from class java.io.BufferedOutputStream
flush, write, writeMethods inherited from class java.io.FilterOutputStream
writeMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
unwrap
Description copied from interface:WrapperOutputStreamUnwraps this stream, potentially forcing unwritten data to be flushed.- Specified by:
unwrapin interfaceWrapperOutputStream- Returns:
- the underlying stream being wrapped
-