java.lang.Object | +--gnu.xml.util.ResolverAll Implemented Interfaces:
XCat
Resolver(java.util.Dictionary dict) Constructs a resolver which understands how to map PUBLIC identifiers to other URIs, typically for local copies of standard DTD components. |
static void | addDirectoryMapping(java.util.Dictionary table, String mappings[][] , java.io.File directory) Updates a dictionary used to map PUBLIC identifiers to file names, so that it uses the mappings in a specified directory. |
static java.lang.String | fileNameToURL(java.lang.String filename) Provides the URL for a named file, without relying on the JDK 1.2 java.io.File#toURL File.toURL() utility method. |
static java.lang.String | fileToURL(java.io.File f) Provides the URL for a file, without relying on the JDK 1.2 java.io.File#toURL File.toURL() utility method. |
static java.lang.String | getEncoding(java.lang.String contentType) This parses most MIME content type strings that have charset=... encoding declarations to and returns the specified encoding. |
static java.lang.String | getURL(java.lang.String fileOrURL) Returns a URL string. |
resolveEntity(java.lang.String publicId, java.lang.String systemId) Uses a local dictionary of public identifiers to resolve URIs, normally with the goal of minimizing network traffic or latencies. |
public Resolver(java.util.Dictionary dict)
public static void addDirectoryMapping(java.util.Dictionary table, String mappings[][] , java.io.File directory)
public static String fileNameToURL(java.lang.String filename)
java.io.IOException
- if the file does not existpublic static String fileToURL(java.io.File f)
java.io.IOException
- if the file does not existpublic static String getEncoding(java.lang.String contentType)
public static String getURL(java.lang.String fileOrURL)
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)