com.isti.util
Class WriterOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended bycom.isti.util.WriterOutputStream

public class WriterOutputStream
extends java.io.OutputStream

Class WriterOutputStream converts a 'Writer' to an 'OutputStream'.


Field Summary
protected  java.io.Writer writerObj
           
 
Constructor Summary
WriterOutputStream(java.io.Writer writerObj)
          Creates a 'Writer' to 'OutputStream' converter.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writerObj

protected final java.io.Writer writerObj
Constructor Detail

WriterOutputStream

public WriterOutputStream(java.io.Writer writerObj)
Creates a 'Writer' to 'OutputStream' converter.

Parameters:
writerObj - the source 'Writer' object.
Method Detail

write

public void write(int ch)
           throws java.io.IOException
Writes a character.

Parameters:
ch - character
Throws:
java.io.IOException

write

public void write(byte[] data)
           throws java.io.IOException
Writes the given data array.

Parameters:
data - data array
Throws:
java.io.IOException

write

public void write(byte[] data,
                  int start,
                  int len)
           throws java.io.IOException
Writes the given section of the given array.

Parameters:
data - data array
start - start index
len - length
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flushes the stream.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes the stream.

Throws:
java.io.IOException