Ableverse™
Platform 6.0

av.util
Class Resource

java.lang.Object
  extended by av.util.Resource

public abstract class Resource
extends Object

A utility class to work with resources loadable from ClassLoaders.

Author:
compl

Method Summary
static Collection<URL> findAllResources(String name)
           
static ClassLoader getCurrentClassLoader()
           
static InputStream getLocalResourceAsStream(String name)
          Load classpath resource only from local file systems.
static URL getResource(String name)
           
static InputStream getResourceAsStream(String name)
           
static Class<?> loadClass(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentClassLoader

public static ClassLoader getCurrentClassLoader()

loadClass

public static Class<?> loadClass(String name)
                          throws ClassNotFoundException
Throws:
ClassNotFoundException

getResource

public static URL getResource(String name)

getResourceAsStream

public static InputStream getResourceAsStream(String name)

findAllResources

public static Collection<URL> findAllResources(String name)

getLocalResourceAsStream

public static InputStream getLocalResourceAsStream(String name)
Load classpath resource only from local file systems. If called from applet code, attempts will be first made to only consult cached jars. If success this will greatly improve performance by avoiding consulting the applet code base every time.

Currently only SUN plugin is supported.


Ableverse™
Platform 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.