Package com.twelvemonkeys.io
Class WriterOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.twelvemonkeys.io.WriterOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class WriterOutputStream extends java.io.OutputStreamWraps aWriterin anOutputStream.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 underlyingOutputStream, 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
-
-
Constructor Summary
Constructors Constructor Description WriterOutputStream(java.io.Writer pWriter)WriterOutputStream(java.io.Writer pWriter, java.lang.String pCharset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()static voidmain(java.lang.String[] pArgs)voidwrite(byte[] pBytes)voidwrite(byte[] pBytes, int pOffset, int pLength)voidwrite(int pByte)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public final void write(byte[] pBytes) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public final void write(byte[] pBytes, int pOffset, int pLength) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public final void write(int pByte)
- Specified by:
writein classjava.io.OutputStream
-
main
public static void main(java.lang.String[] pArgs) throws java.io.IOException- Throws:
java.io.IOException
-
-