|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.wireformats.output.CharacterGenerator<S>
com.google.gdata.wireformats.output.XmlGenerator<S>
S
- source object type for output generationpublic abstract class XmlGenerator<S>
The XmlGenerator class is an abstract base class supporting the implementation of the OutputGenerator interface for XML content types.
Field Summary | |
---|---|
protected static java.util.List<ContentType> |
XML_CONTENT_TYPES
The base set of matching content types for XML content. |
Constructor Summary | |
---|---|
XmlGenerator()
|
Method Summary | |
---|---|
protected static java.util.List<ContentType> |
createMatchingXmlList(ContentType... types)
Creates a new matching ContentType set that contains all of the basic XML types plus an additional list of types. |
void |
generate(java.io.Writer w,
OutputProperties outProps,
S source)
Generates content to the writer based upon the provided request/response. |
abstract void |
generateXml(XmlWriter w,
OutputProperties outProps,
S source)
Generates the XML content to the provided XML writer instance based upon the query request/response attributes. |
protected XmlWriter |
getXmlWriter(java.io.Writer w,
OutputProperties outProps,
java.lang.String charset)
Returns an XmlWriter configured based upon request attributes. |
Methods inherited from class com.google.gdata.wireformats.output.CharacterGenerator |
---|
generate, getCharsetEncoding, getContentWriter, usePrettyPrint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gdata.wireformats.output.OutputGenerator |
---|
getAltFormat, getSourceType |
Field Detail |
---|
protected static final java.util.List<ContentType> XML_CONTENT_TYPES
Constructor Detail |
---|
public XmlGenerator()
Method Detail |
---|
protected XmlWriter getXmlWriter(java.io.Writer w, OutputProperties outProps, java.lang.String charset) throws java.io.IOException
w
- The underlying writer to write tooutProps
- output propertiescharset
- The writer's character encoding (determines which characters
need to be escaped. Note that the writer must already be configured to
use this character set. If the writer and the character set are out of
sync, the generated XML may be overly escaped (not too bad) or
malformed (pretty serious.)
java.io.IOException
- If an error occurs creating the XmlWriter.protected static java.util.List<ContentType> createMatchingXmlList(ContentType... types)
public void generate(java.io.Writer w, OutputProperties outProps, S source) throws java.io.IOException
generate
in class CharacterGenerator<S>
w
- output writer.outProps
- output properties for the generated output.source
- source object for the generated output.
java.io.IOException
public abstract void generateXml(XmlWriter w, OutputProperties outProps, S source) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |