Class DTDResolver
java.lang.Object
net.simplace.core.service.DTDResolver
- All Implemented Interfaces:
EntityResolver
Entity resolver that loads DTD and entity files from the class path instead of the network. If a file is not found on
the class path, an
http:// system ID is used directly, provided its host can be resolved.- Author:
- Andreas Enders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalize()resolveEntity(String aPublicID, String aSystemID) Resolves a DTD or entity file.
-
Constructor Details
-
DTDResolver
public DTDResolver()
-
-
Method Details
-
resolveEntity
Resolves a DTD or entity file. If the system ID (or the public ID, if no system ID is given) ends with.dtdor.ent(ignoring case and a trailing slash), the file name is looked up on the class path. Otherwise, or if it is not found there, anhttp://ID is used as URL if its host can be resolved. After a failed host lookup, further lookups are skipped for 30 seconds.- Specified by:
resolveEntityin interfaceEntityResolver- Returns:
- an input source for the entity, or
nullto let the parser use its default behaviour
-
finalize
-