Package org.apache.commons.io.output
Class FlushShieldOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.apache.commons.io.output.ProxyOutputStream
-
- org.apache.commons.io.output.FlushShieldOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public final class FlushShieldOutputStream extends ProxyOutputStream
Re-implementsFilterOutputStream.flush()to do nothing.- Since:
- 2.22.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlushShieldOutputStream.BuilderBuilds a newFlushShieldOutputStream.
-
Constructor Summary
Constructors Constructor Description FlushShieldOutputStream(java.io.OutputStream out)Constructs aFlushShieldOutputStreamfilter for the specified underlying output stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FlushShieldOutputStream.Builderbuilder()Constructs a new builder ofFlushShieldOutputStream.voidflush()Invokes the delegate'sflush()method.-
Methods inherited from class org.apache.commons.io.output.ProxyOutputStream
afterWrite, beforeWrite, close, handleIOException, setReference, unwrap, write, write, write, writeRepeat, writeRepeat, writeRepeat
-
-
-
-
Constructor Detail
-
FlushShieldOutputStream
public FlushShieldOutputStream(java.io.OutputStream out)
Constructs aFlushShieldOutputStreamfilter for the specified underlying output stream.- Parameters:
out- the underlying output stream to be assigned to the fieldthis.outfor later use, ornullif this instance is to be created without an underlying stream.
-
-
Method Detail
-
builder
public static FlushShieldOutputStream.Builder builder()
Constructs a new builder ofFlushShieldOutputStream.- Returns:
- a new builder of
FlushShieldOutputStream.
-
flush
public void flush() throws java.io.IOException
Description copied from class:ProxyOutputStreamInvokes the delegate'sflush()method.- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classProxyOutputStream- Throws:
java.io.IOException- if an I/O error occurs.
-
-