|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ClassLoader | +--com.objexcel.util.ZipClassLoader
class to load java from directories, zip files, input streams
Constructor Summary | |
ZipClassLoader()
|
Method Summary | |
static ZipClassLoader |
getInstance()
get a singleton instance |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Get an InputStream on a given resource. |
boolean |
isLoaded(java.io.File f)
has the file already been loaded? based on file's absolute path. |
boolean |
isLoaded(java.lang.String location)
is the location loaded (location is http://... |
void |
load(java.io.File f)
load resources from a file (or directory). |
void |
load(java.lang.String location)
from string figure out whether we're loading from an URL, a file or directory |
java.lang.Class |
loadClass(java.lang.String name)
Load a class from this class loader. |
void |
loadZipInputStream(java.util.zip.ZipInputStream zr)
Load classes from a zip input stream |
static byte[] |
readInputStream(java.io.InputStream is)
return as a byte array the given input stream |
static char[] |
readInputStreamReader(java.io.InputStreamReader is,
int iEntrySize)
read the input stream from a stream reader. |
static byte[] |
readZipEntry(java.util.zip.ZipInputStream zipStream,
java.util.zip.ZipEntry zipEntry)
return as a byte array the given zip entry |
static byte[] |
resizeBuffer(byte[] bBuffer,
int iNewBufferSize)
return an array with a length of iNewBufferSize containing as many elements from array as will fit. |
Methods inherited from class java.lang.ClassLoader |
getParent,
getResource,
getResources,
getSystemClassLoader,
getSystemResource,
getSystemResourceAsStream,
getSystemResources |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ZipClassLoader()
Method Detail |
public static ZipClassLoader getInstance()
public boolean isLoaded(java.lang.String location)
public boolean isLoaded(java.io.File f)
public void load(java.lang.String location) throws java.lang.Exception
public void loadZipInputStream(java.util.zip.ZipInputStream zr) throws java.io.IOException
public void load(java.io.File f) throws java.io.IOException
public java.io.InputStream getResourceAsStream(java.lang.String name)
public java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
public static byte[] readInputStream(java.io.InputStream is) throws java.io.IOException
public static byte[] readZipEntry(java.util.zip.ZipInputStream zipStream, java.util.zip.ZipEntry zipEntry)
public static char[] readInputStreamReader(java.io.InputStreamReader is, int iEntrySize)
public static byte[] resizeBuffer(byte[] bBuffer, int iNewBufferSize)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |