Esri Geoportal Server
1.0

com.esri.gpt.framework.util
Class ResourcePath

java.lang.Object
  extended by com.esri.gpt.framework.util.ResourcePath

public class ResourcePath
extends Object

Helps with the location of file resources relative to the deployed application.

This class has no static methods or members to ensure a proper class loader.


Constructor Summary
ResourcePath()
          Default constructor.
 
Method Summary
 InputSource makeInputSource(String path)
          Returns an InputSource for a resource.
 URL makeUrl(String path)
          Returns the URL associated with a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePath

public ResourcePath()
Default constructor.

Method Detail

makeInputSource

public InputSource makeInputSource(String path)
                            throws IOException
Returns an InputSource for a resource.

Parameters:
path - the path for the resource (relative to WEB-INF/classes)
Returns:
an InputSource for the associated resource
Throws:
IOException - if the URL associated with the resource path cannot be generated

makeUrl

public URL makeUrl(String path)
            throws IOException
Returns the URL associated with a resource.

Parameters:
path - the path for the resource (relative to WEB-INF/classes)
Returns:
the associated url
Throws:
IOException - if the URL cannot be generated

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.