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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public final void write(int pByte) - Specified by:
write
in classOutputStream
-
main
- Throws:
IOException
-