Package gnu.bytecode
Class ZipLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- gnu.bytecode.ZipLoader
-
public class ZipLoader extends ClassLoader
Load classes from a Zip archive.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the zip archive - loadClass will reopen if necessary.ClassloadAllClasses()Load all classes immediately from zip archive, close archive.ClassloadClass(String name, boolean resolve)-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
ZipLoader
public ZipLoader(String name) throws IOException
- Throws:
IOException
-
-
Method Detail
-
loadClass
public Class loadClass(String name, boolean resolve) throws ClassNotFoundException
- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
loadAllClasses
public Class loadAllClasses() throws IOException
Load all classes immediately from zip archive, close archive.- Returns:
- main class (1st class in archive).
- Throws:
IOException
-
close
public void close() throws IOExceptionClose the zip archive - loadClass will reopen if necessary.- Throws:
IOException
-
-