程序包 com.sh.util.io

类 ClassLoaderWrapper

java.lang.Object
com.sh.util.io.ClassLoaderWrapper

public class ClassLoaderWrapper extends Object

Description:

Title:首亨软件 - TSS/CRM等

从以下版本开始:
2014年11月11日
  • 方法详细资料

    • getResourceAsURL

      public URL getResourceAsURL(String resource)
      Get a resource as a URL using the current class path
      参数:
      resource - the resource to locate
      返回:
      the resource or null
    • getResourceAsURL

      public URL getResourceAsURL(String resource, ClassLoader classLoader)
      Get a resource from the classpath, starting with a specific class loader
      参数:
      resource - the resource to find
      classLoader - the first classloader to try
      返回:
      the stream or null
    • getResourceAsStream

      public InputStream getResourceAsStream(String resource)
      Get a resource from the classpath
      参数:
      resource - the resource to find
      返回:
      the stream or null
    • getResourceAsStream

      public InputStream getResourceAsStream(String resource, ClassLoader classLoader)
      Get a resource from the classpath, starting with a specific class loader
      参数:
      resource - the resource to find
      classLoader - the first class loader to try
      返回:
      the stream or null
    • classForName

      public Class<?> classForName(String name) throws ClassNotFoundException
      Find a class on the classpath (or die trying)
      参数:
      name - the class to look for
      返回:
      the class
      抛出:
      ClassNotFoundException - ClassNotFoundException
    • classForName

      public Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException
      Find a class on the classpath, starting with a specific classloader (or die trying)
      参数:
      name - the class to look for
      classLoader - the first classloader to try
      返回:
      the class
      抛出:
      ClassNotFoundException - ClassNotFoundException