org.apache.openejb.core.webservices
Class UriResolver

java.lang.Object
  extended by org.apache.openejb.core.webservices.UriResolver

public class UriResolver
extends java.lang.Object

Resolves a File, classpath resource, or URL according to the follow rules:


Constructor Summary
UriResolver()
           
UriResolver(java.lang.String path)
           
UriResolver(java.lang.String baseUriStr, java.lang.String uriStr)
           
UriResolver(java.lang.String baseUriStr, java.lang.String uriStr, java.lang.Class calling)
           
 
Method Summary
 java.io.File getFile()
           
 java.io.InputStream getInputStream()
           
static java.net.URL getResource(java.lang.String resourceName, java.lang.Class callingClass)
          Load a given resource.
 java.net.URI getURI()
           
 java.net.URL getURL()
           
 boolean isFile()
           
 boolean isResolved()
           
 void resolve(java.lang.String baseUriStr, java.lang.String uriStr, java.lang.Class callingCls)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriResolver

public UriResolver()

UriResolver

public UriResolver(java.lang.String path)
            throws java.io.IOException
Throws:
java.io.IOException

UriResolver

public UriResolver(java.lang.String baseUriStr,
                   java.lang.String uriStr)
            throws java.io.IOException
Throws:
java.io.IOException

UriResolver

public UriResolver(java.lang.String baseUriStr,
                   java.lang.String uriStr,
                   java.lang.Class calling)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

resolve

public void resolve(java.lang.String baseUriStr,
                    java.lang.String uriStr,
                    java.lang.Class callingCls)
             throws java.io.IOException
Throws:
java.io.IOException

getURI

public java.net.URI getURI()

getURL

public java.net.URL getURL()

getInputStream

public java.io.InputStream getInputStream()

isFile

public boolean isFile()

getFile

public java.io.File getFile()

isResolved

public boolean isResolved()

getResource

public static java.net.URL getResource(java.lang.String resourceName,
                                       java.lang.Class callingClass)
Load a given resource.

This method will try to load the resource using the following methods (in order):

Parameters:
resourceName - The name of the resource to load
callingClass - The Class object of the calling object


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.