|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A pool of parsers that a resource implementation can use to get a parser instance for parsing XML instance documents.
The use of a parser pool can be specified using XMLResource.OPTION_USE_PARSER_POOL
load option.
The parser instance is retrieved and placed back to the pool
based on the features and properties specified for this parser.
The default implementation is provided by XMLParserPoolImpl
.
Note that the correct properties and feature maps for this parser instance must be provided when retrieving the parser from the pool and, even more importantly when, releasing the parser back to the pool. Failure to do so will result in improperly configured parsers.
Method Summary | |
SAXParser |
get(Map features,
Map properties,
boolean useLexicalHandler)
Retrieves a parser from the pool given specified properties and features. |
void |
release(SAXParser parser,
Map features,
Map properties,
boolean useLexicalHandler)
Returns the parser to the pool. |
Method Detail |
public SAXParser get(Map features, Map properties, boolean useLexicalHandler) throws ParserConfigurationException, SAXException
features
- a map of the parser features and their values.properties
- a map of a parser properties and their values.useLexicalHandler
- whether a lexical handler was set during loading.
ParserConfigurationException
SAXException
public void release(SAXParser parser, Map features, Map properties, boolean useLexicalHandler)
parser
- the parser to return to the pool.features
- a map of the parser features and their values.properties
- a map of a parser properties and their values.useLexicalHandler
- whether a lexical handler was set during loading.
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |