public class WriterOutputStream
extends java.io.OutputStream
Modifier and Type | Field and Description |
---|---|
protected java.io.Writer |
writerObj |
Constructor and Description |
---|
WriterOutputStream(java.io.Writer writerObj)
Creates a 'Writer' to 'OutputStream' converter.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stream.
|
void |
flush()
Flushes the stream.
|
void |
write(byte[] data)
Writes the given data array.
|
void |
write(byte[] data,
int start,
int len)
Writes the given section of the given array.
|
void |
write(int ch)
Writes a character.
|
public WriterOutputStream(java.io.Writer writerObj)
writerObj
- the source 'Writer' object.public void write(int ch) throws java.io.IOException
write
in class java.io.OutputStream
ch
- characterjava.io.IOException
public void write(byte[] data) throws java.io.IOException
write
in class java.io.OutputStream
data
- data arrayjava.io.IOException
public void write(byte[] data, int start, int len) throws java.io.IOException
write
in class java.io.OutputStream
data
- data arraystart
- start indexlen
- lengthjava.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException