public abstract class WireFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.List<WireFormat> |
ALL
List of all supported wire formats.
|
static XmlWireFormat |
XML
XML wire format.
|
Modifier and Type | Method and Description |
---|---|
abstract WireFormatGenerator |
createGenerator(OutputProperties outProps,
java.io.Writer w,
java.nio.charset.Charset cs,
boolean prettyPrint)
Create a wire format generator.
|
abstract WireFormatParser |
createParser(InputProperties inProps,
java.io.Reader r,
java.nio.charset.Charset cs)
Create a wire format parser.
|
WireFormatParser |
createParser(InputProperties inProps,
XmlEventSource source)
Create a wire format parser for a given xml event source.
|
java.lang.String |
getName()
Returns the wire format name.
|
public static final XmlWireFormat XML
public static final java.util.List<WireFormat> ALL
public java.lang.String getName()
public abstract WireFormatGenerator createGenerator(OutputProperties outProps, java.io.Writer w, java.nio.charset.Charset cs, boolean prettyPrint)
outProps
- the output properties to use for outputw
- writer where output is sent tocs
- character set used to encode outputprettyPrint
- true
if output should be in prettyprint formatpublic abstract WireFormatParser createParser(InputProperties inProps, java.io.Reader r, java.nio.charset.Charset cs)
inProps
- the input properties to use when parsingr
- reader where input is retrieved fromcs
- character set used to encode outputpublic WireFormatParser createParser(InputProperties inProps, XmlEventSource source)
UnsupportedOperationException
, subclasses can implement this
if they choose to.