public interface ParserPool
| Modifier and Type | Method and Description |
|---|---|
javax.xml.parsers.DocumentBuilder |
getBuilder()
Gets a builder from the pool.
|
org.w3c.dom.Document |
newDocument()
Convenience method for creating a new document with a pooled builder.
|
org.w3c.dom.Document |
parse(java.io.InputStream input)
Convenience method for parsing an XML file using a pooled builder.
|
org.w3c.dom.Document |
parse(java.io.Reader input)
Convenience method for parsing an XML file using a pooled builder.
|
void |
returnBuilder(javax.xml.parsers.DocumentBuilder builder)
Returns a builder to the pool.
|
@Nonnull
javax.xml.parsers.DocumentBuilder getBuilder()
throws XMLParserException
XMLParserException - thrown if the document builder factory is misconfiguredvoid returnBuilder(@Nullable
javax.xml.parsers.DocumentBuilder builder)
builder - the builder to return@Nonnull
org.w3c.dom.Document newDocument()
throws XMLParserException
XMLParserException - thrown if there is a problem retrieving a builder@Nonnull
org.w3c.dom.Document parse(@Nonnull
java.io.InputStream input)
throws XMLParserException
input - XML to parseXMLParserException - thrown if there is a problem retrieving a builder, the input stream can not be read,
or the XML was invalid@Nonnull
org.w3c.dom.Document parse(@Nonnull
java.io.Reader input)
throws XMLParserException
input - XML to parseXMLParserException - thrown if there is a problem retrieving a builder, the input stream can not be read,
or the XML was invalid