com.twelvemonkeys.io
Class WriterOutputStream
java.lang.Object
java.io.OutputStream
com.twelvemonkeys.io.WriterOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class WriterOutputStream
- extends OutputStream
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 |
protected com.twelvemonkeys.io.WriterOutputStream.Decoder |
decoder
|
protected Writer |
writer
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writer
protected Writer writer
decoder
protected final com.twelvemonkeys.io.WriterOutputStream.Decoder decoder
WriterOutputStream
public WriterOutputStream(Writer pWriter,
String pCharset)
WriterOutputStream
public WriterOutputStream(Writer pWriter)
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class OutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable- Overrides:
flush in class OutputStream
- Throws:
IOException
write
public final void write(byte[] pBytes)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
write
public final void write(byte[] pBytes,
int pOffset,
int pLength)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
write
public final void write(int pByte)
- Specified by:
write in class OutputStream
main
public static void main(String[] pArgs)
throws IOException
- Throws:
IOException
Copyright © 2015. All Rights Reserved.