|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.wireformats.input.AbstractParser<T>
com.google.gdata.wireformats.input.CharacterParser<T>
public abstract class CharacterParser<T>
The CharacterParser class is abstract base class to support the
implementation of an InputParser
for character-based content types.
It encapsulates the code for mapping from an InputStream
to an
Reader
based upon the input content type and then delegates to the
abstract parse(Reader, InputProperties, Class)
method to handle
the actual parsing of the character data.
Method Summary | ||
---|---|---|
|
parse(ParseSource parseSource,
InputProperties inProps,
java.lang.Class<R> targetClass)
The parse method will use the character encoding found in the output properties instance to construct an appropriate Reader and then
delegate to the parse(Reader, InputProperties, Class) method
to perform the parsing. |
|
abstract
|
parse(java.io.Reader inputReader,
InputProperties inProps,
java.lang.Class<R> resultClass)
Parses character content with the specified properties to produce a result of an expected type. |
Methods inherited from class com.google.gdata.wireformats.input.AbstractParser |
---|
getAltFormat, getResultType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public <R extends T> R parse(ParseSource parseSource, InputProperties inProps, java.lang.Class<R> targetClass) throws java.io.IOException, ServiceException
Reader
and then
delegate to the parse(Reader, InputProperties, Class)
method
to perform the parsing.
parseSource
- providing the source of the datainProps
- properties describing the input datatargetClass
- specific type of result expected from the parse
java.io.IOException
ServiceException
public abstract <R extends T> R parse(java.io.Reader inputReader, InputProperties inProps, java.lang.Class<R> resultClass) throws java.io.IOException, ServiceException
Reader
.
R
- expected result typeinputReader
- reader to parse data frominProps
- input propertiesresultClass
- class to instantiate and parse result into.
java.io.IOException
- if an error occurred reading data while parsing
ServiceException
- if an error occurred within the content
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |