FromXmlParser and ToXmlGenerator
instances.
Implements JsonFactory since interface for constructing XML backed
parsers and generators is quite similar to dealing with JSON.
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected transient String | _jdkXmlInFactory
Hiding place for JDK-serialization unthawed factories... |
| protected transient String | _jdkXmlOutFactory
Hiding place for JDK-serialization unthawed factories... |
| protected XmlNameProcessor | |
| protected int | |
| protected transient XMLInputFactory | |
| protected transient XMLOutputFactory | |
| protected int | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| pack-priv static final int | DEFAULT_XML_GENERATOR_FEATURE_FLAGS
Bitfield (set of flags) of all generator features that are enabled by default. |
| pack-priv static final int | DEFAULT_XML_PARSER_FEATURE_FLAGS
Bitfield (set of flags) of all parser features that are enabled by default. |
| public static final String | FORMAT_NAME_XML
Name used to identify XML format
(and returned by |
| private static final long | |
| private static final byte | |
| private static final byte | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | XmlFactory(ObjectCodec oc, int xpFeatures, int xgFeatures, XMLInputFactory xmlIn, XMLOutputFactory xmlOut, String nameForTextElem)
|
| protected | XmlFactory(ObjectCodec oc, int xpFeatures, int xgFeatures, XMLInputFactory xmlIn, XMLOutputFactory xmlOut, String nameForTextElem, XmlNameProcessor nameProcessor)
|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected JsonGenerator | _createGenerator(Writer
Writer underlying writer to write generated content to out, IOContext I/O context to use ctxt)Overrides com. Writer and context object.
|
| protected FromXmlParser | _createParser(InputStream
InputStream to use for reading content to parse in, IOContext I/O context to use for parsing ctxt)Overrides com. InputStream and context object.
|
| protected FromXmlParser | _createParser(Reader
Reader to use for reading content to parse r, IOContext I/O context to use for parsing ctxt)Overrides com. Reader object for reading content.
|
| protected FromXmlParser | _createParser(char[]
Buffer that contains content to parse data, int Offset to the first character of data to parse offset, int Number of characters within buffer to parse len, IOContext I/O context to use for parsing ctxt, boolean Whether input buffer is recycled by the factory recycleBuffer)Overrides com. char[] object for accessing content.
|
| protected FromXmlParser | _createParser(byte[]
Buffer that contains content to parse data, int Offset to the first character of data to parse offset, int Number of characters within buffer to parse len, IOContext I/O context to use for parsing ctxt)Overrides com. Reader object for reading content
passed as raw byte array.
|
| protected XMLStreamWriter | |
| protected XMLStreamWriter | |
| protected OutputStream | |
| protected Writer | |
| protected void | |
| protected final XMLStreamReader | |
| protected final XMLStreamWriter | |
| public static XmlFactoryBuilder | builder()
Hides com. JsonFactory instances with
different configuration: creates and returns a builder for collecting configuration
settings; instance created by calling build() after all configuration
set.
|
| public boolean | canUseCharArrays()
Overrides com. |
| public final XmlFactory | configure(FromXmlParser.
Method for enabling or disabling specified XML parser feature. |
| public final XmlFactory | configure(ToXmlGenerator.
Method for enabling or disabling specified XML generator feature. |
| public XmlFactory | copy()
Overrides com. Note compared to base implementation by |
| public ToXmlGenerator | createGenerator(OutputStream out)
Overrides com. |
| public ToXmlGenerator | createGenerator(OutputStream
OutputStream to use for writing JSON content out, JsonEncoding Character encoding to use enc)Overrides com. |
| public ToXmlGenerator | createGenerator(Writer
Writer to use for writing JSON content out)Overrides com. |
| public ToXmlGenerator | createGenerator(File
File to write contents to f, JsonEncoding Character encoding to use enc)Overrides com. |
| public ToXmlGenerator | createGenerator(XMLStreamWriter sw)
Factory method that wraps given |
| public JsonParser | createParser(String content)
Overrides com. |
| public FromXmlParser | createParser(XMLStreamReader sr)
Factory method that wraps given |
| public XmlFactory | |
| public XmlFactory | |
| public XmlFactory | |
| public XmlFactory | |
| public int | |
| public String | getFormatName()
Overrides com. |
| public int | |
| public Class | getFormatReadFeatureType()
Overrides com. FormatFeature that a parser
JsonParser produced by this factory would accept, if any;
null returned if none.
|
| public Class | getFormatWriteFeatureType()
Overrides com. FormatFeature that a parser
JsonGenerator produced by this factory would accept, if any;
null returned if none.
|
| public XMLInputFactory | |
| public XmlNameProcessor | |
| public XMLOutputFactory | |
| public String | |
| public MatchStrength | |
| public static MatchStrength | hasXMLFormat(InputAccessor acc)
Method that tries to figure out if content seems to be in some kind of XML format. |
| public final boolean | |
| public final boolean | |
| private void | readObject(ObjectInputStream in)
In addition to default serialization, which mostly works, need to handle case of XML factories, hence override. |
| protected Object | readResolve()
Overrides com. |
| public XmlFactoryBuilder | rebuild()
Method that allows construction of differently configured factory, starting
with settings of this factory.
|
| public boolean | Returns: True since XML format does require support from codecOverrides com. ObjectCodec
(that is, XmlMapper), so need to return true here.
|
| public void | setXMLInputFactory(XMLInputFactory f)
Deprecated
Since 2.12 -- should be set as part of build process
(either in builder, or constructor)
|
| public void | |
| public void | setXMLOutputFactory(XMLOutputFactory f)
Deprecated
Since 2.12 -- should be set as part of build process
(either in builder, or constructor)
|
| public void | |
| private static final int | |
| private static final MatchStrength | |
| private static final boolean | |
| public Version | version()
Overrides com. Implements com. Version for details).
|
| private void | writeObject(ObjectOutputStream out)
In addition to default serialization, which mostly works, need to handle case of XML factories, hence override. |