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.
 java.net.URL getURL(java.lang.String resourceName)
           
 byte[] loadBytes(java.lang.String resourceName)
          Loads a the bytes of the specified resources and returns them.
 

Method Detail

loadBytes

byte[] loadBytes(java.lang.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

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

close

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



Copyright © 2011 Sapia OSS. All Rights Reserved.