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 void
close()
Only flushes.void
flush()
void
write(byte[] buf, int off, int len)
void
write(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:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] buf, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
Only flushes. Does NOT close the writer- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-