org.ujac.util.io
Interface ResourceLoader

All Known Implementing Classes:
CachedResourceLoader, ClassPathResourceLoader, ClassResourceLoader, FileResourceLoader, HttpResourceLoader, MultiResourceLoader

public interface ResourceLoader

Title: ResourceLoader
Description: An interface which provides methods to load resources.

Author:
lauerc

Method Summary
 byte[] loadResource(String location)
          Loads a binary resource.
 boolean resourceExists(String location)
          Checks whether or not the desired resource exists.
 

Method Detail

loadResource

byte[] loadResource(String location)
                    throws IOException
Loads a binary resource.

Parameters:
location - The location of the resource.
Returns:
The loaded resource.
Throws:
IOException - In case the loading of the resource failed.

resourceExists

boolean resourceExists(String location)
Checks whether or not the desired resource exists.

Parameters:
location - The location of the resource.
Returns:
true in case the given resource could be located, else false.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.