Package org.apache.xmlgraphics.util
Class WriterOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.xmlgraphics.util.WriterOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class WriterOutputStream extends OutputStream
An OutputStream wrapper for a Writer.
-
-
Constructor Summary
Constructors Constructor Description WriterOutputStream(Writer writer)Creates a new WriterOutputStream.WriterOutputStream(Writer writer, String encoding)Creates a new WriterOutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(byte[] buf)voidwrite(byte[] buf, int offset, int length)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
WriterOutputStream
public WriterOutputStream(Writer writer)
Creates a new WriterOutputStream.- Parameters:
writer- the Writer to write to
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
public void write(byte[] buf, int offset, int length) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] buf) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
-