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

Quick Search    Search Deep

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

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

public class URLResource
extends AbstractResource

An implementation of org.apache.hivemind.Resource built around a string representation of a URL.


Field Summary
private  java.net.URL _url
           
 
Fields inherited from class org.apache.hivemind.util.AbstractResource
 
Constructor Summary
URLResource(java.lang.String path)
           
URLResource(java.net.URL url)
           
 
Method Summary
 org.apache.hivemind.Resource getLocalization(java.util.Locale locale)
          Always returns this location; no localization check occurs.
 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

_url

private java.net.URL _url
Constructor Detail

URLResource

public URLResource(java.net.URL url)

URLResource

public URLResource(java.lang.String path)
Method Detail

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()).


newResource

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

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)
Always returns this location; no localization check occurs.