protected static class SecureGenericXMLFactory.SecureSAXParserFactory extends SAXParserFactory
| Modifier | Constructor and Description |
|---|---|
protected |
SecureGenericXMLFactory.SecureSAXParserFactory(SAXParserFactory factory)
Constructs a new SecureSAXParserFactory instance that delegates
most functionality to an existing instance, but overrides where
needed to protect against XXE attacks.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getFeature(String name) |
Schema |
getSchema() |
boolean |
isNamespaceAware() |
boolean |
isValidating() |
boolean |
isXIncludeAware() |
SAXParser |
newSAXParser() |
void |
setFeature(String name,
boolean value) |
void |
setNamespaceAware(boolean awareness) |
void |
setSchema(Schema schema) |
void |
setValidating(boolean validating) |
void |
setXIncludeAware(boolean state) |
newInstance, newInstanceprotected SecureGenericXMLFactory.SecureSAXParserFactory(SAXParserFactory factory) throws ParserConfigurationException, SAXException
factory - the existing SAXParserFactory that should be secured.ParserConfigurationException - on configuration errors.SAXException - on configuration failures.public SAXParser newSAXParser() throws ParserConfigurationException, SAXException
newSAXParser in class SAXParserFactoryParserConfigurationExceptionSAXExceptionpublic void setNamespaceAware(boolean awareness)
setNamespaceAware in class SAXParserFactorypublic void setValidating(boolean validating)
setValidating in class SAXParserFactorypublic boolean isNamespaceAware()
isNamespaceAware in class SAXParserFactorypublic boolean isValidating()
isValidating in class SAXParserFactorypublic void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
setFeature in class SAXParserFactoryParserConfigurationExceptionSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
getFeature in class SAXParserFactoryParserConfigurationExceptionSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic Schema getSchema() throws UnsupportedOperationException
getSchema in class SAXParserFactoryUnsupportedOperationExceptionpublic void setSchema(Schema schema) throws UnsupportedOperationException
setSchema in class SAXParserFactoryUnsupportedOperationExceptionpublic void setXIncludeAware(boolean state)
throws UnsupportedOperationException
setXIncludeAware in class SAXParserFactoryUnsupportedOperationExceptionpublic boolean isXIncludeAware()
throws UnsupportedOperationException
isXIncludeAware in class SAXParserFactoryUnsupportedOperationExceptionCopyright © 2012. All Rights Reserved.