java.lang.Object
java.io.Writer
java.io.FilterWriter
com.aoapps.lang.io.EncoderWriter
- All Implemented Interfaces:
NoClose
,Closeable
,Flushable
,Appendable
,AutoCloseable
Writer that encodes during write.
See MediaEncoder
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class java.io.FilterWriter
out
-
Constructor Summary
ConstructorDescriptionEncoderWriter
(Encoder encoder, Writer out) EncoderWriter
(Encoder encoder, Writer out, boolean outOptimized) -
Method Summary
Modifier and TypeMethodDescriptionappend
(char c) append
(CharSequence csq) append
(CharSequence csq, int start, int end) This method may be overridden for the purpose of covariant return, but must returnencoder
.getOut()
Gets the wrapped writer, which has been optimized viaCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
.boolean
Determines if calls toNoClose.close()
will be ignored.void
write
(char[] cbuf) void
write
(char[] cbuf, int off, int len) void
write
(int c) void
void
void
final void
Deprecated.void
writeSuffix
(boolean trim) Methods inherited from class java.io.FilterWriter
close, flush
Methods inherited from class java.io.Writer
nullWriter
-
Constructor Details
-
EncoderWriter
- Parameters:
out
- Conditionally passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
outOptimized
- Isout
already known to have been passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
?
-
EncoderWriter
- Parameters:
out
- Will be passed throughCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
-
-
Method Details
-
getEncoder
This method may be overridden for the purpose of covariant return, but must returnencoder
. -
getOut
Gets the wrapped writer, which has been optimized viaCoercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
.This method may be overridden for the purpose of covariant return, but must return
FilterWriter.out
. -
isNoClose
public boolean isNoClose()Description copied from interface:NoClose
Determines if calls toNoClose.close()
will be ignored. This value must not change over time; it may be queried once, repeatedly, or never. -
writePrefix
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classFilterWriter
- Throws:
IOException
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
- Throws:
IOException
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
- Throws:
IOException
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
- Throws:
IOException
-
writeSuffix
Deprecated.Please usewriteSuffix(boolean)
while specifying desired trim.- Throws:
IOException
-
writeSuffix
- Parameters:
trim
- Requests that the buffer be trimmed, if buffered and trim supported.- Throws:
IOException
-
writeSuffix(boolean)
while specifying desired trim.