| Modifier and Type | Field and Description |
|---|---|
| private StorageFile | installedJar
Handle to the installed jar file. |
| private boolean | isStream
True if the jar can only be accessed using a stream, because the jar is itself in a database jar. |
| private JarFile | jar
When the jar file can be manipulated as a java.util.JarFile this holds the reference to the open jar. |
| private final String[] | name
Hides java. |
| private UpdateLoader | |
| private HeaderPrintWriter |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Class | |
| pack-priv final String | |
| private InputStream | |
| private InputStream | |
| public InputStream | getResourceAsStream(String
The resource name name)Overrides java. Returns an input stream for reading the specified resource. |
| private Certificate[] | getSigners(String className, JarEntry je)
Validate the security certificates (signers) for the class data. |
| pack-priv InputStream | |
| private SecurityException | handleException(Exception e, String className)
Provide a SecurityException with information about the class name and the jar file. |
| pack-priv void | initialize()
Initialize the class loader so it knows if it is loading from a ZipFile or an InputStream |
| private boolean | isDerbyDriver(String className)
Return true if the class is a Derby driver class which must be accessible to java.sql.DriverManager. |
| protected Class | loadClass(String
The binary name of the class className, boolean If resolve)true then resolve the classOverrides java. Handle all requests to the top-level loader. |
| pack-priv Class | |
| private Class | loadClassData(InputStream in, String className, String jvmClassName, boolean resolve)
Load the class data when the installed jar is accessible only as an input stream (the jar is itself in a database jar). |
| private Class | loadClassData(JarEntry e, InputStream in, String className, boolean resolve)
Load and optionally resolve the class given its JarEntry and an InputStream to the class fiel format. |
| private Class | loadClassDataFromJar(String className, String jvmClassName, boolean resolve)
Load the class data when the installed jar is accessible as a java.util.jarFile. |
| pack-priv byte[] | readData(JarEntry ze, InputStream in, String className)
Read the raw data for the class file format into a byte array that can be used for loading the class. |
| pack-priv void | |
| public String | toString()
Overrides java. Return the jar name if toString() is called on this class loader. |
| installedJar | back to summary |
|---|---|
| private StorageFile installedJar Handle to the installed jar file. | |
| isStream | back to summary |
|---|---|
| private boolean isStream True if the jar can only be accessed using a stream, because the jar is itself in a database jar. When fals the jar is accessed using the jar field. | |
| jar | back to summary |
|---|---|
| private JarFile jar When the jar file can be manipulated as a java.util.JarFile this holds the reference to the open jar. When the jar can only be manipulated as an InputStream (because the jar is itself in a database jar) then this will be null. | |
| name | back to summary |
|---|---|
| private final String[] name Hides java. Two part name for the jar file. | |
| updateLoader | back to summary |
|---|---|
| private UpdateLoader updateLoader | |
| vs | back to summary |
|---|---|
| private HeaderPrintWriter vs | |
| JarLoader | back to summary |
|---|---|
| pack-priv JarLoader(UpdateLoader updateLoader, String[] name, HeaderPrintWriter vs) | |
| checkLoaded | back to summary |
|---|---|
| pack-priv Class | |
| getJarName | back to summary |
|---|---|
| pack-priv final String getJarName() Return the SQL name for the installed jar. Used for error and informational messages. | |
| getRawStream | back to summary |
|---|---|
| private InputStream getRawStream(String name) Get a stream for a resource directly from a JarFile. In this case we can safely return the stream directly. It's a new stream set up by the zip code to read just the contents of this entry. | |
| getRawStream | back to summary |
|---|---|
| private InputStream getRawStream(InputStream in, String name) Get a stream from a zip file that is itself a stream. We copy to the contents to a byte array and return a stream around that to the caller. Though a copy is involved it has the benefit of:
| |
| getResourceAsStream | back to summary |
|---|---|
| public InputStream getResourceAsStream(String name) Overrides java. Doc from java. Returns an input stream for reading the specified resource. The search order is described in the documentation for Resources in named modules are subject to the encapsulation rules
specified by
| |
| getSigners | back to summary |
|---|---|
| private Certificate[] getSigners(String className, JarEntry je) throws IOException Validate the security certificates (signers) for the class data. | |
| getStream | back to summary |
|---|---|
| pack-priv InputStream getStream(String name) Get an InputStream for the given resource. | |
| handleException | back to summary |
|---|---|
| private SecurityException handleException(Exception e, String className) Provide a SecurityException with information about the class name and the jar file. | |
| initialize | back to summary |
|---|---|
| pack-priv void initialize() Initialize the class loader so it knows if it is loading from a ZipFile or an InputStream | |
| isDerbyDriver | back to summary |
|---|---|
| private boolean isDerbyDriver(String className) Return true if the class is a Derby driver class which must be accessible to java.sql.DriverManager. | |
| loadClass | back to summary |
|---|---|
| protected Class Overrides java. Handle all requests to the top-level loader.
| |
| loadClassData | back to summary |
|---|---|
| pack-priv Class | |
| loadClassData | back to summary |
|---|---|
| private Class Load the class data when the installed jar is accessible only as an input stream (the jar is itself in a database jar). | |
| loadClassData | back to summary |
|---|---|
| private Class Load and optionally resolve the class given its JarEntry and an InputStream to the class fiel format. This is common code for when the jar is accessed directly using JarFile or through InputStream. | |
| loadClassDataFromJar | back to summary |
|---|---|
| private Class Load the class data when the installed jar is accessible as a java.util.jarFile. | |
| readData | back to summary |
|---|---|
| pack-priv byte[] readData(JarEntry ze, InputStream in, String className) throws IOException Read the raw data for the class file format into a byte array that can be used for loading the class. If this is a signed class and it has been compromised then an IOException will be thrown. | |
| setInvalid | back to summary |
|---|---|
| pack-priv void setInvalid() Set this loader to be invaid so that it will not resolve any classes or resources. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return the jar name if toString() is called on this class loader.
| |