Package i2p.susi.util
Class DecodingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- i2p.susi.util.DecodingOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class DecodingOutputStream extends OutputStream
Buffering decoder, with output to a Writer. Adapted from SAM UTF8Reader.- Since:
- 0.9.34
-
-
Constructor Summary
Constructors Constructor Description DecodingOutputStream(Writer out, String charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Only flushes.voidflush()voidwrite(byte[] buf, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
DecodingOutputStream
public DecodingOutputStream(Writer out, String charset) throws UnsupportedEncodingException
- Parameters:
out- UTF-8- Throws:
UnsupportedEncodingException- (an IOException) on unknown charset
-
-
Method Detail
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] buf, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOExceptionOnly flushes. Does NOT close the writer- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
-