Constructor and Description |
---|
DefaultJAXPPool()
Creates an instance using
DefaultJAXPConfiguration . |
DefaultJAXPPool(JAXPConfiguration configuration)
Creates an instance using the specified JAXPConfiguration.
|
Modifier and Type | Method and Description |
---|---|
javax.xml.parsers.DocumentBuilder |
getDocumentBuilder(org.xml.sax.ErrorHandler errorHandler)
Fetches a document builder and sets the given error handler.
|
javax.xml.parsers.SAXParser |
getSAXParser(org.xml.sax.ext.LexicalHandler lexicalHandler)
Fetches a SAX parser and set the given lexical handler.
|
javax.xml.transform.Transformer |
getTransformer(java.lang.String encoding)
Fetches a transformer and set the given encoding.
|
void |
releaseDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
Returns a document builder
fetched from this pool
back to the pool for subsequent reuse. |
void |
releaseSAXParser(javax.xml.parsers.SAXParser parser)
Returns a SAX parser
fetched from this pool
back to the pool for subsequent reuse. |
void |
releaseTransformer(javax.xml.transform.Transformer transformer)
Returns a transformer
fetched from this pool
back to the pool for subsequent reuse. |
public DefaultJAXPPool()
DefaultJAXPConfiguration
.public DefaultJAXPPool(JAXPConfiguration configuration)
configuration
- the non-null configuration used to create new
builders
,
parsers
,
and transformers
.public javax.xml.parsers.DocumentBuilder getDocumentBuilder(org.xml.sax.ErrorHandler errorHandler) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
JAXPPool
getDocumentBuilder
in interface JAXPPool
errorHandler
- the error handler to use while build documents.javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public void releaseDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
JAXPPool
fetched
from this pool
back to the pool for subsequent reuse.releaseDocumentBuilder
in interface JAXPPool
documentBuilder
- the document builder to release.public javax.xml.parsers.SAXParser getSAXParser(org.xml.sax.ext.LexicalHandler lexicalHandler) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
JAXPPool
getSAXParser
in interface JAXPPool
lexicalHandler
- the lexical handler to use while parsing.javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public void releaseSAXParser(javax.xml.parsers.SAXParser parser)
JAXPPool
fetched
from this pool
back to the pool for subsequent reuse.releaseSAXParser
in interface JAXPPool
parser
- the SAX parser to release.public javax.xml.transform.Transformer getTransformer(java.lang.String encoding) throws javax.xml.transform.TransformerException
JAXPPool
getTransformer
in interface JAXPPool
encoding
- the encoding used to convert characters to bytes.javax.xml.transform.TransformerException
public void releaseTransformer(javax.xml.transform.Transformer transformer)
JAXPPool
fetched
from this pool
back to the pool for subsequent reuse.releaseTransformer
in interface JAXPPool
transformer
- the transformer to release.