public final class ReaderConfig extends CommonConfig
Modifier and Type | Field and Description |
---|---|
protected BufferRecycler |
_currRecycler
This is the actually container of the recyclable buffers.
|
static int |
DEFAULT_CHAR_BUFFER_LEN |
static int |
DEFAULT_SMALL_BUFFER_LEN |
static int |
STANDALONE_NO |
static int |
STANDALONE_UNKNOWN |
static int |
STANDALONE_YES |
_flagMods, _flags, IMPL_NAME, IMPL_VERSION
Constructor and Description |
---|
ReaderConfig() |
Modifier and Type | Method and Description |
---|---|
byte[] |
allocFullBBuffer(int minSize) |
char[] |
allocFullCBuffer(int minSize) |
char[] |
allocMediumCBuffer(int minSize) |
char[] |
allocSmallCBuffer(int minSize) |
String |
canonicalizeURI(char[] buf,
int uriLen) |
void |
configureForConvenience()
Method to call to make Reader created be as "convenient" to use
as possible; ie try to avoid having to deal with some of things
like segmented text chunks.
|
void |
configureForLowMemUsage()
Method to call to minimize the memory usage of the stream/event reader;
both regarding Objects created, and the temporary memory usage during
parsing.
|
void |
configureForRoundTripping()
Method to call to make Reader try to preserve as much of input
formatting as possible, so that round-tripping would be as lossless
as possible.
|
void |
configureForSpeed()
Method to call to make the Reader created be as fast as possible reading
documents, especially for long-running processes where caching is
likely to help.
|
void |
configureForXmlConformance()
Method to call to make Reader created conform as closely to XML
standard as possible, doing all checks and transformations mandated
(linefeed conversions, attr value normalizations).
|
ReaderConfig |
createNonShared(String publicId,
String systemId,
String extEnc) |
void |
doAutoCloseInput(boolean state) |
void |
doCoalesceText(boolean state) |
void |
doParseLazily(boolean state) |
void |
doPreserveLocation(boolean state) |
void |
doReportCData(boolean state) |
protected int |
findPropertyId(String propName) |
void |
freeFullBBuffer(byte[] buffer) |
void |
freeFullCBuffer(char[] buffer) |
void |
freeMediumCBuffer(char[] buffer) |
void |
freeSmallCBuffer(char[] buffer) |
String |
getActualEncoding() |
ByteBasedPNameTable |
getBBSymbols() |
CharBasedPNameTable |
getCBSymbols() |
XmlCharTypes |
getCharTypes() |
String |
getExternalEncoding()
This method returns name of encoding that has been passed
explicitly to the reader or writer, from outside.
|
IllegalCharHandler |
getIllegalCharHandler() |
Object |
getProperty(String name,
boolean isMandatory) |
String |
getPublicId() |
String |
getSystemId() |
String |
getXmlDeclEncoding() |
int |
getXmlDeclStandalone() |
String |
getXmlDeclVersion() |
XMLReporter |
getXMLReporter() |
XMLResolver |
getXMLResolver() |
boolean |
hasInternNamesBeenEnabled() |
boolean |
hasInternNsURIsBeenEnabled() |
boolean |
isPropertySupported(String propName) |
boolean |
isXml11() |
void |
setActualEncoding(String actualEnc) |
void |
setIllegalCharHandler(IllegalCharHandler illegalCharHandler) |
boolean |
setProperty(String name,
Object value) |
void |
setXmlDeclInfo(int version,
String xmlDeclEnc,
String standalone) |
void |
setXmlEncoding(String enc) |
void |
setXMLReporter(XMLReporter r) |
void |
setXMLResolver(XMLResolver r) |
void |
setXmlStandalone(Boolean b) |
void |
setXmlVersion(String version) |
void |
updateBBSymbols(ByteBasedPNameTable sym) |
void |
updateCBSymbols(CharBasedPNameTable sym) |
boolean |
willAutoCloseInput() |
boolean |
willCoalesceText() |
boolean |
willExpandEntities() |
boolean |
willInternNames() |
boolean |
willInternNsURIs() |
boolean |
willParseLazily() |
boolean |
willPreserveLocation() |
boolean |
willReportCData() |
boolean |
willSupportNamespaces() |
hasExplicitFlag, hasFlag, hasFlagBeenModified, setFlag
public static final int DEFAULT_SMALL_BUFFER_LEN
public static final int DEFAULT_CHAR_BUFFER_LEN
public static final int STANDALONE_UNKNOWN
public static final int STANDALONE_YES
public static final int STANDALONE_NO
protected BufferRecycler _currRecycler
public void setActualEncoding(String actualEnc)
public final void setXmlVersion(String version)
public final void setXmlEncoding(String enc)
public final void setXmlStandalone(Boolean b)
public void setXMLReporter(XMLReporter r)
public void setXMLResolver(XMLResolver r)
public void doCoalesceText(boolean state)
public void doAutoCloseInput(boolean state)
public void doPreserveLocation(boolean state)
public void doParseLazily(boolean state)
public void doReportCData(boolean state)
public ReaderConfig createNonShared(String publicId, String systemId, String extEnc)
public String getExternalEncoding()
CommonConfig
getExternalEncoding
in class CommonConfig
public String getActualEncoding()
getActualEncoding
in class CommonConfig
public boolean isXml11()
isXml11
in class CommonConfig
protected int findPropertyId(String propName)
public final Object getProperty(String name, boolean isMandatory)
getProperty
in class CommonConfig
isMandatory
- If true, unrecognized property should
result in IllegalArgumentException
public boolean setProperty(String name, Object value)
setProperty
in class CommonConfig
public boolean isPropertySupported(String propName)
isPropertySupported
in class CommonConfig
public XMLReporter getXMLReporter()
public XMLResolver getXMLResolver()
public boolean willExpandEntities()
public boolean willCoalesceText()
public boolean willSupportNamespaces()
public boolean willParseLazily()
public boolean willInternNames()
public boolean willInternNsURIs()
public boolean willReportCData()
public boolean willPreserveLocation()
public boolean willAutoCloseInput()
public boolean hasInternNamesBeenEnabled()
public boolean hasInternNsURIsBeenEnabled()
public String getPublicId()
public String getSystemId()
public String getXmlDeclVersion()
public String getXmlDeclEncoding()
public int getXmlDeclStandalone()
public void configureForXmlConformance()
XMLInputFactory2.configureForXmlConformance()
for
required settings for standard StAX/StAX2 properties.
Notes: Does NOT change 'performance' settings (buffer sizes, DTD caching, coalescing, interning, accurate location info).
public void configureForConvenience()
XMLInputFactory2.configureForConvenience()
for
required settings for standard StAX/StAX2 properties.public void configureForSpeed()
See XMLInputFactory2.configureForSpeed()
for
required settings for standard StAX/StAX2 properties.
public void configureForLowMemUsage()
See XMLInputFactory2.configureForLowMemUsage()
for
required settings for standard StAX/StAX2 properties.
public void configureForRoundTripping()
See XMLInputFactory2.configureForLowMemUsage()
for
required settings for standard StAX/StAX2 properties.
public String canonicalizeURI(char[] buf, int uriLen)
public char[] allocSmallCBuffer(int minSize)
public void freeSmallCBuffer(char[] buffer)
public char[] allocMediumCBuffer(int minSize)
public void freeMediumCBuffer(char[] buffer)
public char[] allocFullCBuffer(int minSize)
public void freeFullCBuffer(char[] buffer)
public byte[] allocFullBBuffer(int minSize)
public void freeFullBBuffer(byte[] buffer)
public ByteBasedPNameTable getBBSymbols()
public CharBasedPNameTable getCBSymbols()
public void updateBBSymbols(ByteBasedPNameTable sym)
public void updateCBSymbols(CharBasedPNameTable sym)
public XmlCharTypes getCharTypes()
public void setIllegalCharHandler(IllegalCharHandler illegalCharHandler)
public IllegalCharHandler getIllegalCharHandler()
Copyright © 2018 FasterXML. All rights reserved.