public class IlvURLResolverManager extends Object implements IlvURLResolver
Constructor and Description |
---|
IlvURLResolverManager()
Constructs a new
IlvURLResolverManager . |
Modifier and Type | Method and Description |
---|---|
void |
addResolver(IlvURLResolver resolver)
Adds the specified
resolver to the manager. |
String |
getAbbreviateForm(URL url)
Returns the abbreviated form of the specified
url . |
IlvURLResolver |
getURLResolver(int index)
Returns the URL resolver at the specified storage
index . |
int |
getURLResolverCount()
Returns the number of URL resolvers stored by this manager.
|
boolean |
removeResolver(IlvURLResolver resolver)
Removes the specified
resolver from the list of stored
URL resolvers. |
URL |
resolveURL(String filename)
Resolves a URL from the specified
filename . |
public IlvURLResolverManager()
IlvURLResolverManager
.public URL resolveURL(String filename)
filename
. All the URL
resolvers added to this manager are asked to resolve a URL from the
file name until one succeeds in resolving the URL.resolveURL
in interface IlvURLResolver
filename
- The filename or relative pathname expression
to retrieve a URL from.filename
or
null
if no URL can be resolved.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 addResolver(IlvURLResolver resolver)
resolver
to the manager.resolver
- The URL resolver to add.public boolean removeResolver(IlvURLResolver resolver)
resolver
from the list of stored
URL resolvers.resolver
- The resolver to remove.true
if the resolver can be removed or
false
if the resolver has not been added to the manager.public IlvURLResolver getURLResolver(int index)
index
.index
- The index of the URL resolver to return.getURLResolverCount()
public int getURLResolverCount()
getURLResolver(int)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.