|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.six.FileEntityResolver
public class FileEntityResolver
Some XML parser packages (e.g. crimson 1.1.3) provide a entity resolver that uses URL connections to retrieve the resources. Unfortunately that doesn't always work. Especially if the URL connection for files in the local file system are opened with "ftp://" protocol.
Therefore this simple entity resolver implementation is capable of returning proper InputResource instances for file ids on the local system.
| Constructor Summary | |
|---|---|
FileEntityResolver()
Initialize the new instance with default values. |
|
FileEntityResolver(boolean validating)
Initialize the new instance with the setting if the parser is validating the XML input. |
|
| Method Summary | |
|---|---|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
If the given systemId specifies a file in the local file system an InputSource with an opended FileInputStream on this file will be returned. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileEntityResolver()
public FileEntityResolver(boolean validating)
validating - Determines whether the resolver must return a resource for a DTD or not| Method Detail |
|---|
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException,
java.io.IOException
resolveEntity in interface org.xml.sax.EntityResolverpublicId - The public identifier of the external entity
being referenced, or null if none was supplied.systemId - The system identifier of the external entity
being referenced.
org.xml.sax.SAXException - Any SAX exception, possibly
wrapping another exception.
java.io.IOException - A Java-specific IO exception,
possibly the result of creating a new InputStream
or Reader for the InputSource.InputSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||