raccoon.api.utils
Interface IResolver

All Known Implementing Classes:
StdResolver

public interface IResolver

A convenience service for locating resources or services.

Since:
Raccoon v0.8
Version:
$Id: IResolver.java,v 1.1 2004/08/08 20:25:57 crouvrais Exp $
Author:
Cedric ROUVRAIS

Method Summary
 java.io.InputStream getResourceAsStream(java.lang.Class pRequesterClass, java.lang.String pDesiredRessource)
          Locates the specified resource and provides an InputStream to it.
 java.io.InputStream getResourceAsStream(java.lang.String pDesiredRessource)
          Locates the specified resource and provides an InputStream to it.
 java.net.URL resolve(java.lang.Class pRequesterClass, java.lang.String pDesiredRessource)
          Locates the specified resource and provides the exact location to it.
 java.net.URL resolve(java.lang.String pDesiredRessource)
          Locates the specified resource and provides the exact location to it.
 

Method Detail

resolve

java.net.URL resolve(java.lang.String pDesiredRessource)
                     throws ResourceNotFoundException
Locates the specified resource and provides the exact location to it.

Parameters:
pDesiredRessource - the resource that is to be located explicitly.
Returns:
the URL to the desired resource.
Throws:
ResourceNotFoundException - if the specified resource couldn't be found.

resolve

java.net.URL resolve(java.lang.Class pRequesterClass,
                     java.lang.String pDesiredRessource)
                     throws ResourceNotFoundException
Locates the specified resource and provides the exact location to it.

Parameters:
pRequesterClass - the requesting class that is to be used as starting point for a relative search.
pDesiredRessource - the resource that is to be located explicitly, this can be a relative location from the given requester class.
Returns:
the URL to the desired resource.
Throws:
ResourceNotFoundException - if the specified resource couldn't be found.

getResourceAsStream

java.io.InputStream getResourceAsStream(java.lang.String pDesiredRessource)
                                        throws ResourceNotFoundException
Locates the specified resource and provides an InputStream to it.

Parameters:
pDesiredRessource - the resource that is to be located explicitly.
Returns:
the URL to the desired resource.
Throws:
ResourceNotFoundException - if the specified resource couldn't be found.

getResourceAsStream

java.io.InputStream getResourceAsStream(java.lang.Class pRequesterClass,
                                        java.lang.String pDesiredRessource)
                                        throws ResourceNotFoundException
Locates the specified resource and provides an InputStream to it.

Parameters:
pRequesterClass - the requesting class that is to be used as starting point for a relative search.
pDesiredRessource - the resource that is to be located explicitly, this can be a relative location from the given requester class.
Returns:
the URL to the desired resource.
Throws:
ResourceNotFoundException - if the specified resource couldn't be found.


Copyright null null. All Rights Reserved.