This component requires the following features and properties from the component manager that uses it:
Modifier and Type | Class and Description |
---|---|
private static class | XMLEntityManager.
Information about auto-detectable encodings. |
protected class | XMLEntityManager.
This class wraps the byte inputstreams we're presented with. |
Modifier and Type | Field and Description |
---|---|
protected static final String | ALLOW_JAVA_ENCODINGS
Feature identifier: allow Java encodings. |
protected static final String | BUFFER_SIZE
property identifier: buffer size. |
private static final boolean | DEBUG_BUFFER
Debug printing of buffer. |
private static final boolean | DEBUG_ENCODINGS
Debug switching readers for encodings. |
private static final boolean | DEBUG_ENTITIES
Debug some basic entities. |
public static final int | DEFAULT_BUFFER_SIZE
Default buffer size (2048). |
public static final int | DEFAULT_INTERNAL_BUFFER_SIZE
Default internal entity buffer size (1024). |
public static final int | DEFAULT_XMLDECL_BUFFER_SIZE
Default buffer size before we've finished with the XMLDecl: |
protected final Object[] | |
private static final String | |
protected static final String | ENTITY_RESOLVER
Property identifier: entity resolver. |
protected int | |
protected static final String | ERROR_REPORTER
Property identifier: error reporter. |
pack-priv static final String | EXTERNAL_ACCESS_DEFAULT
access external dtd: file protocol |
protected static final String | EXTERNAL_GENERAL_ENTITIES
Feature identifier: external general entities. |
protected static final String | EXTERNAL_PARAMETER_ENTITIES
Feature identifier: external parameter entities. |
protected String | fAccessExternalDTD
used to restrict external access |
protected boolean | fAllowJavaEncodings
Allow Java encoding names. |
protected int | fBufferSize
Buffer size. |
pack-priv CatalogFeatures | |
private String | |
pack-priv CatalogResolver | |
protected Entity. | fCurrentEntity
Current entity. |
pack-priv CatalogResolver | |
private String | |
private static final Boolean[] | FEATURE_DEFAULTS
Feature defaults. |
protected Map | fEntities
Entities. |
private final Augmentations | fEntityAugs
Augmentations for entities. |
protected int | fEntityExpansionCount
count of entities expanded: |
protected XMLEntityHandler | fEntityHandler
Entity handler. |
protected XMLEntityResolver | fEntityResolver
Entity resolver. |
protected XMLEntityScanner | fEntityScanner
Current entity scanner |
protected Stack | fEntityStack
Entity stack. |
protected XMLEntityStorage | |
protected XMLErrorReporter | fErrorReporter
Error reporter. |
protected boolean | fExternalGeneralEntities
External general entities. |
protected boolean | fExternalParameterEntities
External parameter entities. |
protected boolean | |
pack-priv boolean | fISCreatedByResolver
identify if the InputSource is created by a resolver |
protected XMLLimitAnalyzer | |
protected boolean | fLoadExternalDTD
Load external DTD. |
private String | |
protected PropertyManager | fPropertyManager
Property Manager. |
protected Stack | |
pack-priv boolean | |
private String | |
private final XMLResourceIdentifierImpl | fResourceIdentifier
Resource identifer. |
protected XMLSecurityManager | fSecurityManager
Security Manager |
pack-priv XMLSecurityPropertyManager | |
protected boolean | fStandalone
True if the document entity is standalone. |
protected StaxEntityResolverWrapper | fStaxEntityResolver
Stax Entity Resolver. |
protected boolean | fStrictURI
standard uri conformant (strict uri). |
pack-priv boolean | fSupportDTD
StAX properties |
pack-priv boolean | |
protected SymbolTable | fSymbolTable
Symbol table. |
private boolean | fUseCatalog
indicate whether Catalog should be used for resolving external resources |
protected boolean | fValidation
Validation. |
protected ValidationManager | fValidationManager
Validation manager. |
protected boolean | fWarnDuplicateEntityDef
warn on duplicate Entity declaration. |
protected XMLEntityScanner | fXML10EntityScanner
XML 1.0 entity scanner. |
protected XMLEntityScanner | fXML11EntityScanner
XML 1.1 entity scanner. |
private static char[] | |
private static char[] | |
private static char[] | |
private static boolean[] | |
private static String | |
private static URI | |
protected static final String | LOAD_EXTERNAL_DTD
Feature identifier: load external DTD. |
protected static final String | |
private static final Object[] | PROPERTY_DEFAULTS
Property defaults. |
private static final String[] | RECOGNIZED_FEATURES
Recognized features. |
private static final String[] | RECOGNIZED_PROPERTIES
Recognized properties. |
protected static final String | SECURITY_MANAGER
property identifier: security manager. |
protected static final String | STANDARD_URI_CONFORMANT
Feature identifier: standard uri conformant |
protected static final String | |
protected static final String | SYMBOL_TABLE
Property identifier: symbol table. |
protected static final String | VALIDATION
Feature identifier: validation. |
protected static final String | |
protected static final String | WARN_ON_DUPLICATE_ENTITYDEF
Feature identifier: warn on duplicate EntityDef |
private static final String | XML_SECURITY_PROPERTY_MANAGER
Property identifier: Security property manager. |
private static final String |
Access | Constructor and Description |
---|---|
public | XMLEntityManager()
If this constructor is used to create the object, reset() should be invoked on this object |
public | XMLEntityManager(XMLSecurityPropertyManager securityPropertyMgr, XMLSecurityManager securityManager)
|
public |
Modifier and Type | Method and Description |
---|---|
public static void | absolutizeAgainstUserDir(URI
the URI to absolutize uri)Absolutizes a URI using the current value of the "user.dir" property as the base URI. |
public void | addExternalEntity(String
The name of the entity. name, String The public identifier of the entity. publicId, String The system identifier of the entity. literalSystemId, String The base system identifier of the entity.
This is the system identifier of the entity
where the entity being added and
is used to expand the system identifier when
the system identifier is a relative URI.
When null the system identifier of the first
external entity on the stack is used instead. baseSystemId)Adds an external entity declaration. |
public void | addInternalEntity(String
The name of the entity. name, String The text of the entity. text)Adds an internal entity declaration. |
public void | |
private void | |
public void | |
public static OutputStream | |
protected Reader | Returns: Returns a reader.The input stream. inputStream, String The encoding name that the input stream is
encoded using. If the user has specified that
Java encoding names are allowed, then the
encoding name may be a Java encoding name;
otherwise, it is an ianaEncoding name. encoding, Boolean For encodings (like uCS-4), whose names cannot
specify a byte order, this tells whether the order
is bigEndian. null if unknown or irrelevant. isBigEndian)Creates a reader capable of reading the given input stream in the specified encoding. |
public void | |
public void | |
public static String | Returns: Returns the URI string representing the expanded system identifier. A null value indicates that the given system identifier is already expanded.The systemId to be expanded. systemId)Expands a system id and returns the system id as a URI, if it can be expanded. |
public static String | Returns: Returns the URI string representing the expanded system identifier. A null value indicates that the given system identifier is already expanded.The systemId to be expanded. systemId, String baseSystemId)Expands a system id and returns the system id as a URI, if it can be expanded. |
public static String | Returns: Returns the URI string representing the expanded system identifier. A null value indicates that the given system identifier is already expanded.The systemId to be expanded. systemId, String baseSystemId, boolean strict)Expands a system id and returns the system id as a URI, if it can be expanded. |
private static String | expandSystemIdStrictOff(String systemId, String baseSystemId)
Helper method for expandSystemId(String,String,boolean):String |
private static String | |
private static String | expandSystemIdStrictOn(String systemId, String baseSystemId)
Helper method for expandSystemId(String,String,boolean):String |
protected static String | |
public int | Returns: The column number, or -1 if none is available.Return the column number where the current document event ends. |
public Entity. | |
public XMLResourceIdentifier | |
protected XMLEntityManager. | Returns: an instance of EncodingInfo which represents the auto-detected encoding.The first four bytes of the input. b4, int The number of bytes actually read. count)Returns the IANA encoding name that is auto-detected from the bytes specified, with the endian-ness of that encoding where appropriate. |
public XMLEntityScanner | |
public XMLEntityStorage | |
public String | Returns: A string containing the expanded system identifier, or null if none is available.Return the expanded system identifier for the current document event. |
public Boolean | getFeatureDefault(String
The feature identifier. featureId)Implements com. Returns the default state for a feature, or null if this component does not want to report a default value for this feature. |
public int | Returns: The line number, or -1 if none is available.Return the line number where the current document event ends. |
public String | Returns: A string containing the literal system identifier, or null if none is available.Return the literal system identifier for the current document event. |
private static String | |
public Object | getPropertyDefault(String
The property identifier. propertyId)Implements com. Returns the default state for a property, or null if this component does not want to report a default value for this property. |
public String | Returns: A string containing the public identifier, or null if none is available.Return the public identifier for the current document event. |
public String[] | getRecognizedFeatures()
Implements com. Returns a list of feature identifiers that are recognized by this component. |
public String[] | getRecognizedProperties()
Implements com. Returns a list of property identifiers that are recognized by this component. |
public Entity. | getTopLevelEntity()
Return the top level entity handled by this manager, or null if no entity was added. |
private static synchronized URI | |
private void | |
public boolean | |
public boolean | Returns: True if the entity was declared in the external subset, false otherwise (including when the entity is not declared).The name of the entity to check. entityName)Checks whether the declaration of an entity given by name is // in the external subset. |
public boolean | Returns: True if the entity is external, false otherwise (including when the entity is not declared).The name of the entity to check. entityName)Checks whether an entity given by name is external. |
public boolean | |
public boolean | |
pack-priv final void | |
public void | |
public void | reset(XMLComponentManager
The component manager. componentManager)Implements com. Resets the component. |
public void | |
private XMLInputSource | resolveEntity(String catalogName, CatalogResolver cr, String publicId, String systemId, String base)
|
public XMLInputSource | Returns: Returns an input source that wraps the resolved entity. This method will never return null.The public identifier of the entity. resourceIdentifier)Implements com. Resolves the specified public and system identifiers. |
public StaxXMLInputSource | |
private XMLInputSource | resolveEntityOrURI(String catalogName, CatalogResolver cr, String publicId, String systemId, String base)
Resolves the external resource using the Catalog specified and returns a XMLInputSource. |
private InputSource | resolveWithCatalog(CatalogResolver cr, String cFile, String publicId, String systemId)
Resolves the external resource using the Catalog specified and returns a InputSource. |
private StaxXMLInputSource | resolveWithCatalogStAX(CatalogResolver cr, String cFile, String publicId, String systemId)
Resolves the external resource using the Catalog specified and returns a StaxXMLInputSource. |
public void | |
public void | setFeature(String
The feature identifier. featureId, boolean The state of the feature. state)Implements com. Sets the state of a feature. |
public void | |
public void | setProperty(String
The property identifier. propertyId, Object The value of the property. value)Implements com. Sets the value of a property. |
public void | |
public void | setStandalone(boolean
True if document entity is standalone. standalone)Sets whether the document entity is standalone. |
public String | Returns: the encoding of the new entity or null if a character stream was employedflag to indicate whether the entity is an Entity Reference. reference, String name of the entity (XML is it's the document entity) name, XMLInputSource the input source, with sufficient information
to begin scanning characters. xmlInputSource, boolean True if this entity is started within a
literal value. literal, boolean whether this entity should be treated as an internal or external entity. isExternal)This method uses the passed-in XMLInputSource to make fCurrentEntity usable for reading. |
public void | startDocumentEntity(XMLInputSource
The input source of the document entity. xmlInputSource)Starts the document entity. |
public void | startDTDEntity(XMLInputSource
The input source of the DTD entity. xmlInputSource)Starts the DTD entity. |
public void | startEntity(boolean
flag to indicate whether the entity is a General Entity isGE, String The name of the entity to start. entityName, boolean True if this entity is started within a literal
value. literal)Starts a named entity. |
public void | startEntity(boolean
flag to indicate whether the entity is a General Entity isGE, String The name of the entity. name, XMLInputSource The input source of the entity. xmlInputSource, boolean True if this entity is started within a
literal value. literal, boolean whether this entity should be treated as an internal or external entity. isExternal)Starts an entity. |
public void | |
public void |