org.sapia.clazzy.loader
Interface Loader

All Known Implementing Classes:
FileSystemLoader, JarLoader

public interface Loader

This interface specifies resource loading behavior. Classloader implementations can use such implementations for loading bytes corresponding to given classes.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Method Summary
 void close()
          Releases all resources that this instance holds.
 URL getURL(String resourceName)
           
 byte[] loadBytes(String resourceName)
          Loads a the bytes of the specified resources and returns them.
 

Method Detail

loadBytes

public byte[] loadBytes(String resourceName)
Loads a the bytes of the specified resources and returns them.

Parameters:
resourceName -
Returns:
an array of bytes, or null if no resource could be found for the given name, or if the bytes could not be loaded for some reason.

getURL

public URL getURL(String resourceName)
Parameters:
resourceName - the name of a resource.
Returns:
the URL corresponding to the given resource.

close

public void close()
Releases all resources that this instance holds.



Copyright © 2002 Sapia Open Community, Inc. All Rights Reserved.