Class XmlFactory
- java.lang.Object
-
- com.fasterxml.jackson.core.TokenStreamFactory
-
- com.fasterxml.jackson.core.JsonFactory
-
- com.fasterxml.jackson.dataformat.xml.XmlFactory
-
- All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned,java.io.Serializable
public class XmlFactory extends com.fasterxml.jackson.core.JsonFactoryFactory used for constructingFromXmlParserandToXmlGeneratorinstances.Implements
JsonFactorysince interface for constructing XML backed parsers and generators is quite similar to dealing with JSON.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_cfgNameForTextElementprotected java.lang.String_jdkXmlInFactoryHiding place for JDK-serialization unthawed factories...protected java.lang.String_jdkXmlOutFactoryHiding place for JDK-serialization unthawed factories...protected XmlNameProcessor_nameProcessorprotected int_xmlGeneratorFeaturesprotected javax.xml.stream.XMLInputFactory_xmlInputFactoryprotected javax.xml.stream.XMLOutputFactory_xmlOutputFactoryprotected int_xmlParserFeaturesprivate static byteBYTE_Dprivate static byteBYTE_EXCLprivate static byteBYTE_HYPHENprivate static byteBYTE_lprivate static byteBYTE_LTprivate static byteBYTE_mprivate static byteBYTE_QMARKprivate static byteBYTE_x(package private) static intDEFAULT_XML_GENERATOR_FEATURE_FLAGSBitfield (set of flags) of all generator features that are enabled by default.(package private) static intDEFAULT_XML_PARSER_FEATURE_FLAGSBitfield (set of flags) of all parser features that are enabled by default.static java.lang.StringFORMAT_NAME_XMLName used to identify XML format (and returned bygetFormatName()private static longserialVersionUIDprivate static byteUTF8_BOM_1private static byteUTF8_BOM_2private static byteUTF8_BOM_3-
Fields inherited from class com.fasterxml.jackson.core.JsonFactory
_byteSymbolCanonicalizer, _characterEscapes, _errorReportConfiguration, _factoryFeatures, _generatorDecorators, _generatorFeatures, _inputDecorator, _maximumNonEscapedChar, _objectCodec, _outputDecorator, _parserFeatures, _quoteChar, _recyclerPool, _rootCharSymbols, _rootValueSeparator, _streamReadConstraints, _streamWriteConstraints, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS, DEFAULT_QUOTE_CHAR, DEFAULT_ROOT_VALUE_SEPARATOR, FORMAT_NAME_JSON
-
-
Constructor Summary
Constructors Modifier Constructor Description XmlFactory()Default constructor used to create factory instances.XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc)XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc, int xpFeatures, int xgFeatures, javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut, java.lang.String nameForTextElem)protectedXmlFactory(com.fasterxml.jackson.core.ObjectCodec oc, int xpFeatures, int xgFeatures, javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut, java.lang.String nameForTextElem, XmlNameProcessor nameProcessor)XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc, javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut)protectedXmlFactory(XmlFactoryBuilder b)Constructors used byJsonFactoryBuilderfor instantiation.protectedXmlFactory(XmlFactory src, com.fasterxml.jackson.core.ObjectCodec oc)XmlFactory(javax.xml.stream.XMLInputFactory xmlIn)XmlFactory(javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected com.fasterxml.jackson.core.JsonGenerator_createGenerator(java.io.Writer out, com.fasterxml.jackson.core.io.IOContext ctxt)protected FromXmlParser_createParser(byte[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt)protected FromXmlParser_createParser(char[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt, boolean recycleBuffer)protected FromXmlParser_createParser(java.io.InputStream in, com.fasterxml.jackson.core.io.IOContext ctxt)protected FromXmlParser_createParser(java.io.Reader r, com.fasterxml.jackson.core.io.IOContext ctxt)protected javax.xml.stream.XMLStreamWriter_createXmlWriter(com.fasterxml.jackson.core.io.IOContext ctxt, java.io.OutputStream out)protected javax.xml.stream.XMLStreamWriter_createXmlWriter(com.fasterxml.jackson.core.io.IOContext ctxt, java.io.Writer w)protected java.io.OutputStream_decorate(com.fasterxml.jackson.core.io.IOContext ioCtxt, java.io.OutputStream out)protected java.io.Writer_decorate(com.fasterxml.jackson.core.io.IOContext ioCtxt, java.io.Writer out)protected void_initFactories(javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut)protected javax.xml.stream.XMLStreamReader_initializeXmlReader(javax.xml.stream.XMLStreamReader sr)protected javax.xml.stream.XMLStreamWriter_initializeXmlWriter(javax.xml.stream.XMLStreamWriter sw)static XmlFactoryBuilderbuilder()booleancanUseCharArrays()As of 2.4, we do have actual capability for passing char arrays efficiently, but unfortunately have no working mechanism for recycling buffers.XmlFactoryconfigure(FromXmlParser.Feature f, boolean state)Method for enabling or disabling specified XML parser feature.XmlFactoryconfigure(ToXmlGenerator.Feature f, boolean state)Method for enabling or disabling specified XML generator feature.XmlFactorycopy()Note: compared to base implementation byJsonFactory, here the copy will actually share underlying XML input and output factories, as there is no way to make copies of those.ToXmlGeneratorcreateGenerator(java.io.File f, com.fasterxml.jackson.core.JsonEncoding enc)ToXmlGeneratorcreateGenerator(java.io.OutputStream out)ToXmlGeneratorcreateGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc)ToXmlGeneratorcreateGenerator(java.io.Writer out)ToXmlGeneratorcreateGenerator(javax.xml.stream.XMLStreamWriter sw)Factory method that wraps givenXMLStreamWriter, usually to allow incremental serialization to compose large output by serializing a sequence of individual objects.com.fasterxml.jackson.core.JsonParsercreateParser(java.lang.String content)Overridden just to prevent trying to optimize access via char array; while nice idea, problem is that we don't have proper hooks to ensure that temporary buffer gets recycled; so let's just use StringReader.FromXmlParsercreateParser(javax.xml.stream.XMLStreamReader sr)Factory method that wraps givenXMLStreamReader, usually to allow partial data-binding.XmlFactorydisable(FromXmlParser.Feature f)Method for disabling specified XML parser feature.XmlFactorydisable(ToXmlGenerator.Feature f)Method for disabling specified XML generator feature.XmlFactoryenable(FromXmlParser.Feature f)Method for enabling specified XML parser feature.XmlFactoryenable(ToXmlGenerator.Feature f)Method for enabling specified XML generator feature.intgetFormatGeneratorFeatures()java.lang.StringgetFormatName()Method that returns short textual id identifying format this factory supports.intgetFormatParserFeatures()java.lang.Class<FromXmlParser.Feature>getFormatReadFeatureType()java.lang.Class<ToXmlGenerator.Feature>getFormatWriteFeatureType()javax.xml.stream.XMLInputFactorygetXMLInputFactory()XmlNameProcessorgetXmlNameProcessor()javax.xml.stream.XMLOutputFactorygetXMLOutputFactory()java.lang.StringgetXMLTextElementName()com.fasterxml.jackson.core.format.MatchStrengthhasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)static com.fasterxml.jackson.core.format.MatchStrengthhasXMLFormat(com.fasterxml.jackson.core.format.InputAccessor acc)Method that tries to figure out if content seems to be in some kind of XML format.booleanisEnabled(FromXmlParser.Feature f)Checked whether specified XML parser feature is enabled.booleanisEnabled(ToXmlGenerator.Feature f)Check whether specified XML generator feature is enabled.private voidreadObject(java.io.ObjectInputStream in)In addition to default serialization, which mostly works, need to handle case of XML factories, hence override.protected java.lang.ObjectreadResolve()Method that we need to override to actually make restoration go through constructors etc.XmlFactoryBuilderrebuild()booleanrequiresCustomCodec()XML format does require support from customObjectCodec(that is,XmlMapper), so need to return true here.voidsetXMLInputFactory(javax.xml.stream.XMLInputFactory f)Deprecated.Since 2.12 -- should be set as part of build process (either in builder, or constructor)voidsetXmlNameProcessor(XmlNameProcessor processor)voidsetXMLOutputFactory(javax.xml.stream.XMLOutputFactory f)Deprecated.Since 2.12 -- should be set as part of build process (either in builder, or constructor)voidsetXMLTextElementName(java.lang.String name)private static intskipSpace(com.fasterxml.jackson.core.format.InputAccessor acc, byte b)private static com.fasterxml.jackson.core.format.MatchStrengthtryMatch(com.fasterxml.jackson.core.format.InputAccessor acc, java.lang.String matchStr, com.fasterxml.jackson.core.format.MatchStrength fullMatchStrength)private static booleanvalidXmlNameStartChar(com.fasterxml.jackson.core.format.InputAccessor acc, byte b)com.fasterxml.jackson.core.Versionversion()private voidwriteObject(java.io.ObjectOutputStream out)In addition to default serialization, which mostly works, need to handle case of XML factories, hence override.-
Methods inherited from class com.fasterxml.jackson.core.JsonFactory
_checkInvalidCopy, _copy, _createContentReference, _createContentReference, _createContext, _createContext, _createNonBlockingContext, _createParser, _createUTF8Generator, _createWriter, _decorate, _decorate, _decorate, _decorate, _decorate, _decorate, _getBufferRecycler, _getRecyclerPool, canHandleBinaryNatively, canParseAsync, canUseSchema, configure, configure, configure, createGenerator, createGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createNonBlockingByteArrayParser, createNonBlockingByteBufferParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, disable, disable, disable, enable, enable, enable, getCharacterEscapes, getCodec, getFactoryFeatures, getGeneratorFeatures, getInputDecorator, getOutputDecorator, getParserFeatures, getRootValueSeparator, hasJSONFormat, isEnabled, isEnabled, isEnabled, isEnabled, isEnabled, requiresPropertyOrdering, setCharacterEscapes, setCodec, setErrorReportConfiguration, setInputDecorator, setOutputDecorator, setRecyclerPool, setRootValueSeparator, setStreamReadConstraints, setStreamWriteConstraints, streamReadConstraints, streamWriteConstraints
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
FORMAT_NAME_XML
public static final java.lang.String FORMAT_NAME_XML
Name used to identify XML format (and returned bygetFormatName()- See Also:
- Constant Field Values
-
DEFAULT_XML_PARSER_FEATURE_FLAGS
static final int DEFAULT_XML_PARSER_FEATURE_FLAGS
Bitfield (set of flags) of all parser features that are enabled by default.
-
DEFAULT_XML_GENERATOR_FEATURE_FLAGS
static final int DEFAULT_XML_GENERATOR_FEATURE_FLAGS
Bitfield (set of flags) of all generator features that are enabled by default.
-
_xmlParserFeatures
protected int _xmlParserFeatures
-
_xmlGeneratorFeatures
protected int _xmlGeneratorFeatures
-
_xmlInputFactory
protected transient javax.xml.stream.XMLInputFactory _xmlInputFactory
-
_xmlOutputFactory
protected transient javax.xml.stream.XMLOutputFactory _xmlOutputFactory
-
_cfgNameForTextElement
protected java.lang.String _cfgNameForTextElement
-
_nameProcessor
protected XmlNameProcessor _nameProcessor
-
_jdkXmlInFactory
protected transient java.lang.String _jdkXmlInFactory
Hiding place for JDK-serialization unthawed factories...
-
_jdkXmlOutFactory
protected transient java.lang.String _jdkXmlOutFactory
Hiding place for JDK-serialization unthawed factories...
-
UTF8_BOM_1
private static final byte UTF8_BOM_1
- See Also:
- Constant Field Values
-
UTF8_BOM_2
private static final byte UTF8_BOM_2
- See Also:
- Constant Field Values
-
UTF8_BOM_3
private static final byte UTF8_BOM_3
- See Also:
- Constant Field Values
-
BYTE_x
private static final byte BYTE_x
- See Also:
- Constant Field Values
-
BYTE_m
private static final byte BYTE_m
- See Also:
- Constant Field Values
-
BYTE_l
private static final byte BYTE_l
- See Also:
- Constant Field Values
-
BYTE_D
private static final byte BYTE_D
- See Also:
- Constant Field Values
-
BYTE_LT
private static final byte BYTE_LT
- See Also:
- Constant Field Values
-
BYTE_QMARK
private static final byte BYTE_QMARK
- See Also:
- Constant Field Values
-
BYTE_EXCL
private static final byte BYTE_EXCL
- See Also:
- Constant Field Values
-
BYTE_HYPHEN
private static final byte BYTE_HYPHEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XmlFactory
public XmlFactory()
Default constructor used to create factory instances. Creation of a factory instance is a light-weight operation, but it is still a good idea to reuse limited number of factory instances (and quite often just a single instance): factories are used as context for storing some reused processing objects (such as symbol tables parsers use) and this reuse only works within context of a single factory instance.
-
XmlFactory
public XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc)
-
XmlFactory
public XmlFactory(javax.xml.stream.XMLInputFactory xmlIn)
-
XmlFactory
public XmlFactory(javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut)
-
XmlFactory
public XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc, javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut)
-
XmlFactory
public XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc, int xpFeatures, int xgFeatures, javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut, java.lang.String nameForTextElem)
-
XmlFactory
protected XmlFactory(com.fasterxml.jackson.core.ObjectCodec oc, int xpFeatures, int xgFeatures, javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut, java.lang.String nameForTextElem, XmlNameProcessor nameProcessor)
-
XmlFactory
protected XmlFactory(XmlFactory src, com.fasterxml.jackson.core.ObjectCodec oc)
- Since:
- 2.2.1
-
XmlFactory
protected XmlFactory(XmlFactoryBuilder b)
Constructors used byJsonFactoryBuilderfor instantiation.- Since:
- 2.9
-
-
Method Detail
-
builder
public static XmlFactoryBuilder builder()
-
rebuild
public XmlFactoryBuilder rebuild()
- Overrides:
rebuildin classcom.fasterxml.jackson.core.JsonFactory
-
_initFactories
protected void _initFactories(javax.xml.stream.XMLInputFactory xmlIn, javax.xml.stream.XMLOutputFactory xmlOut)
-
copy
public XmlFactory copy()
Note: compared to base implementation byJsonFactory, here the copy will actually share underlying XML input and output factories, as there is no way to make copies of those.- Overrides:
copyin classcom.fasterxml.jackson.core.JsonFactory
-
version
public com.fasterxml.jackson.core.Version version()
- Specified by:
versionin interfacecom.fasterxml.jackson.core.Versioned- Overrides:
versionin classcom.fasterxml.jackson.core.JsonFactory
-
readResolve
protected java.lang.Object readResolve()
Method that we need to override to actually make restoration go through constructors etc.- Overrides:
readResolvein classcom.fasterxml.jackson.core.JsonFactory
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundExceptionIn addition to default serialization, which mostly works, need to handle case of XML factories, hence override.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExceptionIn addition to default serialization, which mostly works, need to handle case of XML factories, hence override.- Throws:
java.io.IOException
-
setXMLTextElementName
public void setXMLTextElementName(java.lang.String name)
- Since:
- 2.1
-
getXMLTextElementName
public java.lang.String getXMLTextElementName()
- Since:
- 2.2
-
configure
public final XmlFactory configure(FromXmlParser.Feature f, boolean state)
Method for enabling or disabling specified XML parser feature.
-
enable
public XmlFactory enable(FromXmlParser.Feature f)
Method for enabling specified XML parser feature.
-
disable
public XmlFactory disable(FromXmlParser.Feature f)
Method for disabling specified XML parser feature.
-
isEnabled
public final boolean isEnabled(FromXmlParser.Feature f)
Checked whether specified XML parser feature is enabled.
-
getFormatParserFeatures
public int getFormatParserFeatures()
- Overrides:
getFormatParserFeaturesin classcom.fasterxml.jackson.core.JsonFactory
-
getFormatGeneratorFeatures
public int getFormatGeneratorFeatures()
- Overrides:
getFormatGeneratorFeaturesin classcom.fasterxml.jackson.core.JsonFactory
-
getXmlNameProcessor
public XmlNameProcessor getXmlNameProcessor()
-
setXmlNameProcessor
public void setXmlNameProcessor(XmlNameProcessor processor)
-
configure
public final XmlFactory configure(ToXmlGenerator.Feature f, boolean state)
Method for enabling or disabling specified XML generator feature.
-
enable
public XmlFactory enable(ToXmlGenerator.Feature f)
Method for enabling specified XML generator feature.
-
disable
public XmlFactory disable(ToXmlGenerator.Feature f)
Method for disabling specified XML generator feature.
-
isEnabled
public final boolean isEnabled(ToXmlGenerator.Feature f)
Check whether specified XML generator feature is enabled.
-
getXMLInputFactory
public javax.xml.stream.XMLInputFactory getXMLInputFactory()
- Since:
- 2.4
-
setXMLInputFactory
@Deprecated public void setXMLInputFactory(javax.xml.stream.XMLInputFactory f)
Deprecated.Since 2.12 -- should be set as part of build process (either in builder, or constructor)
-
getXMLOutputFactory
public javax.xml.stream.XMLOutputFactory getXMLOutputFactory()
- Since:
- 2.4
-
setXMLOutputFactory
@Deprecated public void setXMLOutputFactory(javax.xml.stream.XMLOutputFactory f)
Deprecated.Since 2.12 -- should be set as part of build process (either in builder, or constructor)
-
getFormatName
public java.lang.String getFormatName()
Method that returns short textual id identifying format this factory supports.Note: sub-classes should override this method; default implementation will return null for all sub-classes
- Overrides:
getFormatNamein classcom.fasterxml.jackson.core.JsonFactory
-
hasFormat
public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc) throws java.io.IOException- Overrides:
hasFormatin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
requiresCustomCodec
public boolean requiresCustomCodec()
XML format does require support from customObjectCodec(that is,XmlMapper), so need to return true here.- Overrides:
requiresCustomCodecin classcom.fasterxml.jackson.core.JsonFactory- Returns:
- True since XML format does require support from codec
-
canUseCharArrays
public boolean canUseCharArrays()
As of 2.4, we do have actual capability for passing char arrays efficiently, but unfortunately have no working mechanism for recycling buffers. So we have to admit that can not make efficient use.- Overrides:
canUseCharArraysin classcom.fasterxml.jackson.core.JsonFactory
-
getFormatReadFeatureType
public java.lang.Class<FromXmlParser.Feature> getFormatReadFeatureType()
- Overrides:
getFormatReadFeatureTypein classcom.fasterxml.jackson.core.JsonFactory
-
getFormatWriteFeatureType
public java.lang.Class<ToXmlGenerator.Feature> getFormatWriteFeatureType()
- Overrides:
getFormatWriteFeatureTypein classcom.fasterxml.jackson.core.JsonFactory
-
createParser
public com.fasterxml.jackson.core.JsonParser createParser(java.lang.String content) throws java.io.IOExceptionOverridden just to prevent trying to optimize access via char array; while nice idea, problem is that we don't have proper hooks to ensure that temporary buffer gets recycled; so let's just use StringReader.- Overrides:
createParserin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
createGenerator
public ToXmlGenerator createGenerator(java.io.OutputStream out) throws java.io.IOException
- Overrides:
createGeneratorin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
createGenerator
public ToXmlGenerator createGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc) throws java.io.IOException
- Overrides:
createGeneratorin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
createGenerator
public ToXmlGenerator createGenerator(java.io.Writer out) throws java.io.IOException
- Overrides:
createGeneratorin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
createGenerator
public ToXmlGenerator createGenerator(java.io.File f, com.fasterxml.jackson.core.JsonEncoding enc) throws java.io.IOException
- Overrides:
createGeneratorin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
createParser
public FromXmlParser createParser(javax.xml.stream.XMLStreamReader sr) throws java.io.IOException
Factory method that wraps givenXMLStreamReader, usually to allow partial data-binding.- Throws:
java.io.IOException- Since:
- 2.4
-
createGenerator
public ToXmlGenerator createGenerator(javax.xml.stream.XMLStreamWriter sw) throws java.io.IOException
Factory method that wraps givenXMLStreamWriter, usually to allow incremental serialization to compose large output by serializing a sequence of individual objects.- Throws:
java.io.IOException- Since:
- 2.4
-
_createParser
protected FromXmlParser _createParser(java.io.InputStream in, com.fasterxml.jackson.core.io.IOContext ctxt) throws java.io.IOException
- Overrides:
_createParserin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
_createParser
protected FromXmlParser _createParser(java.io.Reader r, com.fasterxml.jackson.core.io.IOContext ctxt) throws java.io.IOException
- Overrides:
_createParserin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
_createParser
protected FromXmlParser _createParser(char[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt, boolean recycleBuffer) throws java.io.IOException
- Overrides:
_createParserin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
_createParser
protected FromXmlParser _createParser(byte[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt) throws java.io.IOException
- Overrides:
_createParserin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
_createGenerator
protected com.fasterxml.jackson.core.JsonGenerator _createGenerator(java.io.Writer out, com.fasterxml.jackson.core.io.IOContext ctxt) throws java.io.IOException- Overrides:
_createGeneratorin classcom.fasterxml.jackson.core.JsonFactory- Throws:
java.io.IOException
-
_createXmlWriter
protected javax.xml.stream.XMLStreamWriter _createXmlWriter(com.fasterxml.jackson.core.io.IOContext ctxt, java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
_createXmlWriter
protected javax.xml.stream.XMLStreamWriter _createXmlWriter(com.fasterxml.jackson.core.io.IOContext ctxt, java.io.Writer w) throws java.io.IOException- Throws:
java.io.IOException
-
_initializeXmlWriter
protected final javax.xml.stream.XMLStreamWriter _initializeXmlWriter(javax.xml.stream.XMLStreamWriter sw) throws java.io.IOException- Throws:
java.io.IOException
-
_initializeXmlReader
protected final javax.xml.stream.XMLStreamReader _initializeXmlReader(javax.xml.stream.XMLStreamReader sr) throws java.io.IOException- Throws:
java.io.IOException
-
hasXMLFormat
public static com.fasterxml.jackson.core.format.MatchStrength hasXMLFormat(com.fasterxml.jackson.core.format.InputAccessor acc) throws java.io.IOExceptionMethod that tries to figure out if content seems to be in some kind of XML format. Note that implementation here is not nearly as robust as what underlying Stax parser will do; the idea is to first support common encodings, then expand as needed (for example, it is not all that hard to support UTF-16; but it is some work and not needed quite yet)- Throws:
java.io.IOException
-
validXmlNameStartChar
private static final boolean validXmlNameStartChar(com.fasterxml.jackson.core.format.InputAccessor acc, byte b) throws java.io.IOException- Throws:
java.io.IOException
-
tryMatch
private static final com.fasterxml.jackson.core.format.MatchStrength tryMatch(com.fasterxml.jackson.core.format.InputAccessor acc, java.lang.String matchStr, com.fasterxml.jackson.core.format.MatchStrength fullMatchStrength) throws java.io.IOException- Throws:
java.io.IOException
-
skipSpace
private static final int skipSpace(com.fasterxml.jackson.core.format.InputAccessor acc, byte b) throws java.io.IOException- Throws:
java.io.IOException
-
_decorate
protected java.io.OutputStream _decorate(com.fasterxml.jackson.core.io.IOContext ioCtxt, java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
_decorate
protected java.io.Writer _decorate(com.fasterxml.jackson.core.io.IOContext ioCtxt, java.io.Writer out) throws java.io.IOException- Throws:
java.io.IOException
-
-