protected static class SecureGenericXMLFactory.SecureDocumentBuilderFactory extends DocumentBuilderFactory
| Modifier | Constructor and Description |
|---|---|
protected |
SecureGenericXMLFactory.SecureDocumentBuilderFactory(DocumentBuilderFactory factory)
Constructs a new SecureDocumentBuilderFactory instance that delegates
most functionality to an existing instance, but overrides where
needed to protect against XXE attacks.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String name) |
boolean |
getFeature(String name) |
Schema |
getSchema() |
boolean |
isCoalescing() |
boolean |
isExpandEntityReferences() |
boolean |
isIgnoringComments() |
boolean |
isIgnoringElementContentWhitespace() |
boolean |
isIncludeAware() |
boolean |
isNamespaceAware() |
boolean |
isValidating() |
DocumentBuilder |
newDocumentBuilder() |
void |
setAttribute(String name,
Object value) |
void |
setCoalescing(boolean coalescing) |
void |
setExpandEntityReferences(boolean expandEntityRef) |
void |
setFeature(String name,
boolean value) |
void |
setIgnoringComments(boolean ignoreComments) |
void |
setIgnoringElementContentWhitespace(boolean whitespace) |
void |
setNamespaceAware(boolean awareness) |
void |
setSchema(Schema schema) |
void |
setValidating(boolean validating) |
void |
setXIncludeAware(boolean state) |
isXIncludeAware, newInstance, newInstanceprotected SecureGenericXMLFactory.SecureDocumentBuilderFactory(DocumentBuilderFactory factory)
factory - the existing DocumentBuilderFactory that should be
secured.public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException
newDocumentBuilder in class DocumentBuilderFactoryParserConfigurationExceptionpublic void setNamespaceAware(boolean awareness)
setNamespaceAware in class DocumentBuilderFactorypublic void setValidating(boolean validating)
setValidating in class DocumentBuilderFactorypublic void setIgnoringElementContentWhitespace(boolean whitespace)
setIgnoringElementContentWhitespace in class DocumentBuilderFactorypublic void setExpandEntityReferences(boolean expandEntityRef)
setExpandEntityReferences in class DocumentBuilderFactorypublic void setIgnoringComments(boolean ignoreComments)
setIgnoringComments in class DocumentBuilderFactorypublic void setCoalescing(boolean coalescing)
setCoalescing in class DocumentBuilderFactorypublic boolean isNamespaceAware()
isNamespaceAware in class DocumentBuilderFactorypublic boolean isValidating()
isValidating in class DocumentBuilderFactorypublic boolean isIgnoringElementContentWhitespace()
isIgnoringElementContentWhitespace in class DocumentBuilderFactorypublic boolean isExpandEntityReferences()
isExpandEntityReferences in class DocumentBuilderFactorypublic boolean isIgnoringComments()
isIgnoringComments in class DocumentBuilderFactorypublic boolean isCoalescing()
isCoalescing in class DocumentBuilderFactorypublic void setAttribute(String name, Object value) throws IllegalArgumentException
setAttribute in class DocumentBuilderFactoryIllegalArgumentExceptionpublic Object getAttribute(String name) throws IllegalArgumentException
getAttribute in class DocumentBuilderFactoryIllegalArgumentExceptionpublic void setFeature(String name, boolean value) throws ParserConfigurationException
setFeature in class DocumentBuilderFactoryParserConfigurationExceptionpublic boolean getFeature(String name) throws ParserConfigurationException
getFeature in class DocumentBuilderFactoryParserConfigurationExceptionpublic Schema getSchema() throws UnsupportedOperationException
getSchema in class DocumentBuilderFactoryUnsupportedOperationExceptionpublic void setSchema(Schema schema) throws UnsupportedOperationException
setSchema in class DocumentBuilderFactoryUnsupportedOperationExceptionpublic void setXIncludeAware(boolean state)
throws UnsupportedOperationException
setXIncludeAware in class DocumentBuilderFactoryUnsupportedOperationExceptionpublic boolean isIncludeAware()
throws UnsupportedOperationException
UnsupportedOperationExceptionCopyright © 2012. All Rights Reserved.