gov.nih.nlm.util
Class UTF8OutputStreamWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.OutputStreamWriter
          extended bygov.nih.nlm.util.UTF8OutputStreamWriter

public class UTF8OutputStreamWriter
extends OutputStreamWriter

An OutputStreamWriter that can make the first 3 bytes the UTF8 Byte Order Mark (BOM) bytes.

Author:
Deborah Shapiro

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
UTF8OutputStreamWriter(OutputStream output_stream)
          Instantiates an UTF8OutputStreamWriter.
UTF8OutputStreamWriter(OutputStream output_stream, boolean write_bom)
          Instantiates an UTF8OutputStreamWriter.
 
Methods inherited from class java.io.OutputStreamWriter
close, flush, getEncoding, write, write, write
 
Methods inherited from class java.io.Writer
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UTF8OutputStreamWriter

public UTF8OutputStreamWriter(OutputStream output_stream,
                              boolean write_bom)
                       throws UnsupportedEncodingException,
                              IOException
Instantiates an UTF8OutputStreamWriter. Can prepend the UTF8 byte lorder mark (BOM) to the output.

Parameters:
output_stream - the OutputStream
write_bom - true if byte order mark should be written false otherwise
Throws:
UnsupportedEncodingException - if "UTF-8" is not supported
IOException - if anything goes wrong

UTF8OutputStreamWriter

public UTF8OutputStreamWriter(OutputStream output_stream)
                       throws UnsupportedEncodingException,
                              IOException
Instantiates an UTF8OutputStreamWriter. Does not prepend the UTF8 byte order mark (BOM) to the output.

Parameters:
output_stream - the OutputStream
Throws:
UnsupportedEncodingException - if "UTF-8" is not supported
IOException - if anything goes wrong


Copyright ©2005