gov.nih.nlm.util
Class UTF8InputStreamReader

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.InputStreamReader
          extended bygov.nih.nlm.util.UTF8InputStreamReader

public class UTF8InputStreamReader
extends InputStreamReader

An InputStreamReader that ignores the first 3 bytes if they are the UTF8 Byte Order Mark (BOM) bytes.

Author:
Deborah Shapiro

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
UTF8InputStreamReader(BufferedInputStream input_stream)
          Instantiates an UTF8InputStreamReader.
 
Method Summary
 boolean hasByteOrderMark()
           
 
Methods inherited from class java.io.InputStreamReader
close, getEncoding, read, read, ready
 
Methods inherited from class java.io.Reader
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UTF8InputStreamReader

public UTF8InputStreamReader(BufferedInputStream input_stream)
                      throws UnsupportedEncodingException,
                             IOException
Instantiates an UTF8InputStreamReader.

Parameters:
input_stream - BufferedInputStream
Throws:
UnsupportedEncodingException - if "UTF-8" is not suported
IOException - if anything goes wrong
Method Detail

hasByteOrderMark

public boolean hasByteOrderMark()


Copyright ©2005