- java.lang.Object
-
- java.io.Writer
-
- java.io.FilterWriter
-
- com.aoapps.lang.io.EncoderWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public class EncoderWriter extends FilterWriter
Writer that encodes during write.See MediaEncoder
- Author:
- AO Industries, Inc.
-
-
Field Summary
-
Fields inherited from class java.io.FilterWriter
out
-
-
Constructor Summary
Constructors Constructor Description EncoderWriter(Encoder encoder, Writer out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncoderWriterappend(char c)EncoderWriterappend(CharSequence csq)EncoderWriterappend(CharSequence csq, int start, int end)EncodergetEncoder()WritergetOut()Gets the wrapped writer.voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(String str)voidwrite(String str, int off, int len)voidwritePrefix()voidwriteSuffix()-
Methods inherited from class java.io.FilterWriter
close, flush
-
Methods inherited from class java.io.Writer
nullWriter
-
-
-
-
Method Detail
-
getEncoder
public Encoder getEncoder()
-
getOut
public Writer getOut()
Gets the wrapped writer.
-
writePrefix
public void writePrefix() throws IOException- Throws:
IOException
-
write
public void write(int c) throws IOException- Overrides:
writein classFilterWriter- Throws:
IOException
-
write
public void write(char[] cbuf) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(char[] cbuf, int off, int len) throws IOException- Overrides:
writein classFilterWriter- Throws:
IOException
-
write
public void write(String str) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String str, int off, int len) throws IOException
- Overrides:
writein classFilterWriter- Throws:
IOException
-
append
public EncoderWriter append(char c) throws IOException
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
public EncoderWriter append(CharSequence csq) throws IOException
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
public EncoderWriter append(CharSequence csq, int start, int end) throws IOException
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
writeSuffix
public void writeSuffix() throws IOException- Throws:
IOException
-
-