com.google.gdata.wireformats
Class ParserUtils

java.lang.Object
  extended by com.google.gdata.wireformats.ParserUtils

public abstract class ParserUtils
extends java.lang.Object

Utility functions shared across parser implementations.


Method Summary
static java.io.Reader getInputReader(java.io.InputStream input, java.nio.charset.Charset cs)
          Returns a reader based upon the character set (encoding).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInputReader

public static java.io.Reader getInputReader(java.io.InputStream input,
                                            java.nio.charset.Charset cs)
                                     throws java.io.IOException
Returns a reader based upon the character set (encoding). Use the special UnicodeReader class for Unicode encodings, to work around a JDK bug related to Unicode byte order markings.

Parameters:
input - content to parse
cs - character set (encoding) used by content
Returns:
reader
Throws:
java.io.IOException - if specified encoding cannot be used