com.sun.javatest.util
public class WriterStream extends java.io.OutputStream
Constructor and Description |
---|
WriterStream(java.io.Writer w)
Create a stream that writes to a writer.
|
WriterStream(java.io.Writer w,
java.lang.String charsetName)
Create a stream that writes to a writer.
|
public WriterStream(java.io.Writer w)
w
- the writerpublic WriterStream(java.io.Writer w, java.lang.String charsetName)
w
- the writercharsetName
- name of encoding to be used when decode byte stream
(instead of default one)public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- next byte from OutputStream to write.java.io.IOException
Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.