public final class UncheckedFilterWriter
extends java.io.FilterWriter
FilterWriter
that throws UncheckedIOException
instead of IOException
.
To build an instance, see UncheckedFilterWriter.Builder
.
FilterWriter
,
IOException
,
UncheckedIOException
Modifier and Type | Class and Description |
---|---|
static class |
UncheckedFilterWriter.Builder
Builds a new
UncheckedFilterWriter instance. |
Modifier | Constructor and Description |
---|---|
private |
UncheckedFilterWriter(java.io.Writer writer)
Constructs a new filtered writer.
|
Modifier and Type | Method and Description |
---|---|
java.io.Writer |
append(char c)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
java.io.Writer |
append(java.lang.CharSequence csq)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
java.io.Writer |
append(java.lang.CharSequence csq,
int start,
int end)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
static UncheckedFilterWriter.Builder |
builder()
Constructs a new
UncheckedFilterWriter.Builder . |
void |
close()
Calls this method's super and rethrow
IOException as UncheckedIOException . |
void |
flush()
Calls this method's super and rethrow
IOException as UncheckedIOException . |
void |
write(char[] cbuf)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
void |
write(char[] cbuf,
int off,
int len)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
void |
write(int c)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
void |
write(java.lang.String str)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
void |
write(java.lang.String str,
int off,
int len)
Calls this method's super and rethrow
IOException as UncheckedIOException . |
private UncheckedFilterWriter(java.io.Writer writer)
writer
- a Writer object providing the underlying stream.java.lang.NullPointerException
- if writer
is null
.public static UncheckedFilterWriter.Builder builder()
UncheckedFilterWriter.Builder
.UncheckedFilterWriter.Builder
.public java.io.Writer append(char c) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.append
in interface java.lang.Appendable
append
in class java.io.Writer
java.io.UncheckedIOException
public java.io.Writer append(java.lang.CharSequence csq) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.append
in interface java.lang.Appendable
append
in class java.io.Writer
java.io.UncheckedIOException
public java.io.Writer append(java.lang.CharSequence csq, int start, int end) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.append
in interface java.lang.Appendable
append
in class java.io.Writer
java.io.UncheckedIOException
public void close() throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterWriter
java.io.UncheckedIOException
public void flush() throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.flush
in interface java.io.Flushable
flush
in class java.io.FilterWriter
java.io.UncheckedIOException
public void write(char[] cbuf) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.write
in class java.io.Writer
java.io.UncheckedIOException
public void write(char[] cbuf, int off, int len) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.write
in class java.io.FilterWriter
java.io.UncheckedIOException
public void write(int c) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.write
in class java.io.FilterWriter
java.io.UncheckedIOException
public void write(java.lang.String str) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.write
in class java.io.Writer
java.io.UncheckedIOException
public void write(java.lang.String str, int off, int len) throws java.io.UncheckedIOException
IOException
as UncheckedIOException
.write
in class java.io.FilterWriter
java.io.UncheckedIOException