org.apache.hivemind.util
Class FileResource
java.lang.Object
org.apache.hivemind.util.AbstractResource
org.apache.hivemind.util.FileResource
- All Implemented Interfaces:
- Resource
public class FileResource
- extends AbstractResource
An implementation of Resource
built around
File
.
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FileResource
public FileResource(java.lang.String path)
FileResource
public FileResource(java.lang.String path,
java.util.Locale locale)
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)
- Description copied from interface:
Resource
- Returns a localized version of this resource (or this resource, if no
appropriate localization is found). Should only be invoked
on a base resource.
- 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.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.