|
|||||||||
| 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>
S - source object type for object generationpublic abstract class CharacterGenerator<S>
The CharacterGenerator class is a base class to support the implementation of
character-oriented OutputGenerator types. It provides common logic
for determining the appropriate character set encoding based upon output
properties and will provide a bridge between output streams and writers.
| Constructor Summary | |
|---|---|
CharacterGenerator()
|
|
| Method Summary | |
|---|---|
void |
generate(java.io.OutputStream contentStream,
OutputProperties outProps,
S s)
Generates content to the output stream based upon the provided request/response. |
abstract void |
generate(java.io.Writer contentWriter,
OutputProperties outProps,
S s)
Generates character content to the specified writer. |
protected static java.lang.String |
getCharsetEncoding(OutputProperties outProps)
Returns the character set encoding that should be used for generated output. |
protected java.io.Writer |
getContentWriter(OutputProperties outProps,
java.io.OutputStream contentStream)
Returns a Writer that is properly configured to generate output
based upon the request and response attributes. |
protected boolean |
usePrettyPrint(OutputProperties outProps)
Returns true if the output should use a pretty printed format on
output. |
| 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 |
| Constructor Detail |
|---|
public CharacterGenerator()
| Method Detail |
|---|
protected static java.lang.String getCharsetEncoding(OutputProperties outProps)
outProps - output properties for generated output
protected java.io.Writer getContentWriter(OutputProperties outProps,
java.io.OutputStream contentStream)
throws java.io.IOException
Writer that is properly configured to generate output
based upon the request and response attributes.
outProps - output properties for the generated output.contentStream -
java.io.IOException
public void generate(java.io.OutputStream contentStream,
OutputProperties outProps,
S s)
throws java.io.IOException
OutputGenerator
generate in interface OutputGenerator<S>contentStream - the target stream for content generation.outProps - output properties for the generated outputs - source object for output generation
java.io.IOException
public abstract void generate(java.io.Writer contentWriter,
OutputProperties outProps,
S s)
throws java.io.IOException
contentWriter - output writer.outProps - output properties for the generated output.s - source object for the generated output.
java.io.IOExceptionprotected boolean usePrettyPrint(OutputProperties outProps)
true if the output should use a pretty printed format on
output. The default implementation will pretty print output if the
GDataProtocol.Parameter#PRETTYPRINT parameter has a value of
"true".
outProps - output properties for the generated output.
true if the output should be formatted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||