org.jboss.jdocbook.util
Class ResourceHelper

java.lang.Object
  extended by org.jboss.jdocbook.util.ResourceHelper

public class ResourceHelper
extends java.lang.Object

Simple helpers for locating and handling classpath and file URL resource lookups.

Author:
Steve Ebersole

Constructor Summary
ResourceHelper()
           
 
Method Summary
static java.net.URL locateResource(java.lang.String name)
          Locate said resource.
static java.net.URL requireResource(java.lang.String name)
          Locate said resource, throwing an exception if it could not be found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceHelper

public ResourceHelper()
Method Detail

requireResource

public static java.net.URL requireResource(java.lang.String name)
Locate said resource, throwing an exception if it could not be found.

Parameters:
name - The resource name.
Returns:
The resource's URL.
Throws:
java.lang.IllegalArgumentException - If the resource could not be found.

locateResource

public static java.net.URL locateResource(java.lang.String name)
Locate said resource.

Parameters:
name - The resource name.
Returns:
The resource's URL.


Copyright © 2007-2010 JBoss, a division of Red Hat, Inc. All Rights Reserved.