Package com.twelvemonkeys.io
Class WriterOutputStream
java.lang.Object
java.io.OutputStream
com.twelvemonkeys.io.WriterOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Wraps a
Writer in an OutputStream.
Instances of this class are not thread-safe.
NOTE: This class is probably not the right way of solving your problem,
however it might prove useful in JSPs etc.
If possible, it's always better to use the Writer's underlying
OutputStream, or wrap it's native backing.
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/WriterOutputStream.java#2 $
- Author:
- Harald Kuhr
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWriterOutputStream(Writer pWriter) WriterOutputStream(Writer pWriter, String pCharset) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
writer
-
decoder
protected final com.twelvemonkeys.io.WriterOutputStream.Decoder decoder
-
-
Constructor Details
-
WriterOutputStream
-
WriterOutputStream
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public final void write(int pByte) - Specified by:
writein classOutputStream
-
main
- Throws:
IOException
-