jd.xml.util
Class DefaultUriResolver
java.lang.Object
jd.xml.util.DefaultUriResolver
- All Implemented Interfaces:
- UriResolver
- Direct Known Subclasses:
- ConvertingResolver
- public class DefaultUriResolver
- extends Object
- implements UriResolver
A default UriResolver.
Method Summary |
XmlSource |
resolveUri(String href,
String baseUri)
Try to build a new uri from the href and baseUri parameter and
open a InputStream from a file or an url. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final DefaultUriResolver INSTANCE
- The instance.
DefaultUriResolver
protected DefaultUriResolver()
resolveUri
public XmlSource resolveUri(String href,
String baseUri)
throws IOException
- Try to build a new uri from the href and baseUri parameter and
open a InputStream from a file or an url.
- Specified by:
resolveUri
in interface UriResolver
- Parameters:
href
- a href attribute, which may be relative or absolute.baseUri
- the base uri in effect when the href attribute was encountered
- Returns:
- a XmlSource object, or null if the href cannot be resolved,
and the caller should try to resolve the URI in some other way.
- Throws:
IOException
- if an error occurs when trying to resolve the URI.