Package org.apache.commons.io.output
Class UncheckedFilterOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.UncheckedFilterOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A
FilterOutputStream that throws UncheckedIOException instead of UncheckedIOException.
To build an instance, use UncheckedFilterOutputStream.Builder.
- Since:
- 2.12.0
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateUncheckedFilterOutputStream(OutputStream outputStream) Constructs an output stream filter built on top of the specified underlying output stream. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Constructs a newUncheckedFilterOutputStream.Builder.voidclose()Calls this method's super and rethrowIOExceptionasUncheckedIOException.voidflush()Calls this method's super and rethrowIOExceptionasUncheckedIOException.voidwrite(byte[] b) Calls this method's super and rethrowIOExceptionasUncheckedIOException.voidwrite(byte[] b, int off, int len) Calls this method's super and rethrowIOExceptionasUncheckedIOException.voidwrite(int b) Calls this method's super and rethrowIOExceptionasUncheckedIOException.
-
Constructor Details
-
UncheckedFilterOutputStream
Constructs an output stream filter built on top of the specified underlying output stream.- Parameters:
outputStream- the underlying output stream, ornullif this instance is to be created without an underlying stream.
-
-
Method Details
-
builder
Constructs a newUncheckedFilterOutputStream.Builder.- Returns:
- a new
UncheckedFilterOutputStream.Builder.
-
close
Calls this method's super and rethrowIOExceptionasUncheckedIOException.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
UncheckedIOException
-
flush
Calls this method's super and rethrowIOExceptionasUncheckedIOException.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterOutputStream- Throws:
UncheckedIOException
-
write
Calls this method's super and rethrowIOExceptionasUncheckedIOException.- Overrides:
writein classFilterOutputStream- Throws:
UncheckedIOException
-
write
Calls this method's super and rethrowIOExceptionasUncheckedIOException.- Overrides:
writein classFilterOutputStream- Throws:
UncheckedIOException
-
write
Calls this method's super and rethrowIOExceptionasUncheckedIOException.- Overrides:
writein classFilterOutputStream- Throws:
UncheckedIOException
-