public class IlvDocumentBaseResolver extends Object implements IlvURLResolver
Constructor and Description |
---|
IlvDocumentBaseResolver(URL documentBase)
Creates an
IlvDocumentBaseResolver instance that resolves
URLs from the specified documentBase URL. |
Modifier and Type | Method and Description |
---|---|
String |
getAbbreviateForm(URL url)
Returns the abbreviated form of the specified
url . |
URL |
getDocumentBase()
Returns the document base this resolver uses to resolve URLs.
|
URL |
resolveURL(String filename)
Resolves a URL from the specified
filename . |
void |
setDocumentBase(URL documentBase)
Sets a new document base to this URL resolver.
|
public IlvDocumentBaseResolver(URL documentBase)
IlvDocumentBaseResolver
instance that resolves
URLs from the specified documentBase
URL.documentBase
- The base URL for constructing the URL to resolve from.public URL resolveURL(String filename)
filename
.resolveURL
in interface IlvURLResolver
filename
- The file name or relative pathname expression
to retrieve a URL from.filename
to the document base of this resolver or
null
if no stream can be created from the constructed
URL.public URL getDocumentBase()
public String getAbbreviateForm(URL url)
url
. If the URL
is returned by the resolveURL(java.lang.String)
method, the abbreviated form should
be the file name given as the parameter of the resolveURL(java.lang.String)
method.getAbbreviateForm
in interface IlvURLResolver
url
- The URL to retrieve the abbreviated form from.url
.public void setDocumentBase(URL documentBase)
documentBase
- The new document base.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.