Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.hivemind.util
Class FileResource  view FileResource download FileResource.java

java.lang.Object
  extended byorg.apache.hivemind.util.AbstractResource
      extended byorg.apache.hivemind.util.FileResource
All Implemented Interfaces:
org.apache.hivemind.Resource

public class FileResource
extends AbstractResource

An implementation of org.apache.hivemind.Resource built around java.io.File.


Field Summary
private static org.apache.commons.logging.Log LOG
           
 
Fields inherited from class org.apache.hivemind.util.AbstractResource
 
Constructor Summary
FileResource(java.lang.String path)
           
FileResource(java.lang.String path, java.util.Locale locale)
           
 
Method Summary
private  java.io.File getFile()
           
 org.apache.hivemind.Resource getLocalization(java.util.Locale locale)
          Returns a localized version of this resource (or this resource, if no appropriate localization is found).
 java.net.URL getResourceURL()
          Returns a URL for the resource.
protected  org.apache.hivemind.Resource newResource(java.lang.String path)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class org.apache.hivemind.util.AbstractResource
equals, getLocale, getName, getPath, getRelativeResource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.commons.logging.Log LOG
Constructor Detail

FileResource

public FileResource(java.lang.String path)

FileResource

public FileResource(java.lang.String path,
                    java.util.Locale locale)
Method Detail

newResource

protected org.apache.hivemind.Resource newResource(java.lang.String path)
Specified by:
newResource in class AbstractResource

getFile

private java.io.File getFile()

getResourceURL

public java.net.URL getResourceURL()
Description copied from interface: org.apache.hivemind.Resource
Returns a URL for the resource.


getLocalization

public org.apache.hivemind.Resource getLocalization(java.util.Locale locale)
Description copied from interface: org.apache.hivemind.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.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).