org.apache.hivemind.util
Class URLResource
java.lang.Object
org.apache.hivemind.util.AbstractResource
org.apache.hivemind.util.URLResource
- All Implemented Interfaces:
- Resource
public class URLResource
- extends AbstractResource
An implementation of Resource
built around a string representation of a URL.
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
URLResource
public URLResource(java.net.URL url)
URLResource
public URLResource(java.lang.String path)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
newResource
protected Resource newResource(java.lang.String path)
- Specified by:
newResource
in class AbstractResource
getResourceURL
public java.net.URL getResourceURL()
- Description copied from interface:
Resource
- Returns a URL for the resource.
- Returns:
- the URL for the resource if it exists, or null if it does not
getLocalization
public Resource getLocalization(java.util.Locale locale)
- Always returns this location; no localization check occurs.
- Parameters:
locale
- to localize for, or null for no localization.
- Returns:
- a localized version of this resource, of null if the resource
itself does not exist.
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.