Package org.apache.commons.io.output
Class UncheckedFilterWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.FilterWriter
-
- org.apache.commons.io.output.UncheckedFilterWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public final class UncheckedFilterWriter extends java.io.FilterWriter
AFilterWriter
that throwsUncheckedIOException
instead ofIOException
.To build an instance, see
UncheckedFilterWriter.Builder
.- Since:
- 2.12.0
- See Also:
FilterWriter
,IOException
,UncheckedIOException
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UncheckedFilterWriter.Builder
Builds a newUncheckedFilterWriter
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Writer
append(char c)
Calls this method's super and rethrowIOException
asUncheckedIOException
.java.io.Writer
append(java.lang.CharSequence csq)
Calls this method's super and rethrowIOException
asUncheckedIOException
.java.io.Writer
append(java.lang.CharSequence csq, int start, int end)
Calls this method's super and rethrowIOException
asUncheckedIOException
.static UncheckedFilterWriter.Builder
builder()
Constructs a newUncheckedFilterWriter.Builder
.void
close()
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
flush()
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
write(char[] cbuf)
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
write(char[] cbuf, int off, int len)
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
write(int c)
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
write(java.lang.String str)
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
write(java.lang.String str, int off, int len)
Calls this method's super and rethrowIOException
asUncheckedIOException
.
-
-
-
Method Detail
-
builder
public static UncheckedFilterWriter.Builder builder()
Constructs a newUncheckedFilterWriter.Builder
.- Returns:
- a new
UncheckedFilterWriter.Builder
.
-
append
public java.io.Writer append(char c) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
append
in interfacejava.lang.Appendable
- Overrides:
append
in classjava.io.Writer
- Throws:
java.io.UncheckedIOException
-
append
public java.io.Writer append(java.lang.CharSequence csq) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
append
in interfacejava.lang.Appendable
- Overrides:
append
in classjava.io.Writer
- Throws:
java.io.UncheckedIOException
-
append
public java.io.Writer append(java.lang.CharSequence csq, int start, int end) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
append
in interfacejava.lang.Appendable
- Overrides:
append
in classjava.io.Writer
- Throws:
java.io.UncheckedIOException
-
close
public void close() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.FilterWriter
- Throws:
java.io.UncheckedIOException
-
flush
public void flush() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.FilterWriter
- Throws:
java.io.UncheckedIOException
-
write
public void write(char[] cbuf) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
write
in classjava.io.Writer
- Throws:
java.io.UncheckedIOException
-
write
public void write(char[] cbuf, int off, int len) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
write
in classjava.io.FilterWriter
- Throws:
java.io.UncheckedIOException
-
write
public void write(int c) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
write
in classjava.io.FilterWriter
- Throws:
java.io.UncheckedIOException
-
write
public void write(java.lang.String str) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
write
in classjava.io.Writer
- Throws:
java.io.UncheckedIOException
-
write
public void write(java.lang.String str, int off, int len) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
write
in classjava.io.FilterWriter
- Throws:
java.io.UncheckedIOException
-
-