public abstract class

WireFormat

extends Object
java.lang.Object
   ↳ com.google.gdata.wireformats.WireFormat
Known Direct Subclasses

Class Overview

Top-level information about a wire format. All wire formats have an associated generator and parser, plus a method to validate content model metadata to ensure it's compatible with the wire format.

Summary

Fields
public static final List<WireFormat> ALL List of all supported wire formats.
public static final XmlWireFormat XML XML wire format.
protected final String name Logical name for the wire format.
Protected Constructors
WireFormat(String name)
Constructs a new wire format with the specific logical name.
Public Methods
abstract WireFormatGenerator createGenerator(OutputProperties outProps, Writer w, Charset cs, boolean prettyPrint)
Create a wire format generator.
abstract WireFormatParser createParser(InputProperties inProps, Reader r, Charset cs)
Create a wire format parser.
WireFormatParser createParser(InputProperties inProps, XmlEventSource source)
Create a wire format parser for a given xml event source.
String getName()
Returns the wire format name.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final List<WireFormat> ALL

List of all supported wire formats.

public static final XmlWireFormat XML

XML wire format.

protected final String name

Logical name for the wire format.

Protected Constructors

protected WireFormat (String name)

Constructs a new wire format with the specific logical name.

Parameters
name Wire format name.

Public Methods

public abstract WireFormatGenerator createGenerator (OutputProperties outProps, Writer w, Charset cs, boolean prettyPrint)

Create a wire format generator.

Parameters
outProps The output properties to use for output
w Writer where output is sent to
cs Character set used to encode output
prettyPrint true if output should be in prettyprint format
Returns
  • wire format generator

public abstract WireFormatParser createParser (InputProperties inProps, Reader r, Charset cs)

Create a wire format parser.

Parameters
inProps The input properties to use when parsing
r Reader where input is retrieved from
cs Character set used to encode output
Returns
  • wire format parser

public WireFormatParser createParser (InputProperties inProps, XmlEventSource source)

Create a wire format parser for a given xml event source. By default this throws UnsupportedOperationException, subclasses can implement this if they choose to.

Parameters
inProps
source

public String getName ()

Returns the wire format name.

Returns
  • logical name of wire format.