borland Packages Class Hierarchy jb.io Package
java.lang.Object +----com.borland.jb.io.SimpleCharOutputStream +----com.borland.jb.io.EncodedOutputStream
Constructors Properties Methods
An implementation of SimpleCharOutputStream that is optimized for data where most of the characters belong to the specified character set. Other characters are assumed to be encoded in Unicode escapes.
public EncodedOutputStream(OutputStream out)Creates output stream encoded in the default encoding.
public EncodedOutputStream(OutputStream out, String encodingString)Creates output stream encoded in the specified encoding. Unicode characters passed in for a write() will be converted to native, potentially multibyte, forms. Characters that cannot be encoded in the specified encoding will be represented in Unicode escapes.
public EncodedOutputStream(OutputStream out, String encodingString, int bufferSize)Creates output stream encoded in the specified encoding and the specified buffer size. Currently this class does not do its own buffering -- the buffer size is ignored. Unicode characters passed in for a write() will be converted to native, potentially multibyte, forms.
public void close()Closes the encoded output stream. Should be the last operation done with this object.
public void flush()Causes all currently buffered information to be written to the output stream.
public void write(int ch)Writes the character represented by the ch parameter. This method will block until the byte is actually written.
This method throws an IOException if an I/O error has occurred. The destination is encoded with the specified character set. Characters that cannot be encoded in the specified character set are encoded with Unicode escapes, like "?". Malformed Unicode characters (characters that are invalid in any encoding) are converted to '?'.