public class Archive extends java.lang.Object implements FileArchive
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkNativeLibrary(java.lang.String path)
Check for native library in archive.
|
boolean |
exists(java.lang.String path,
boolean onlyDirs)
Get a BundleResourceStream to named entry inside an Archive.
|
java.util.Enumeration<java.lang.String> |
findResourcesPath(java.lang.String path)
Returns an Enumeration of all the paths (
String objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument. |
BundleGeneration |
getBundleGeneration()
Get bundle id for this archive.
|
BundleResourceStream |
getBundleResourceStream(java.lang.String component)
Get a BundleResourceStream to named entry inside an Archive.
|
byte[] |
getClassBytes(java.lang.String classFile)
Get a byte array containg the contents of named class file from the
archive.
|
java.lang.String |
getNativeLibrary(java.lang.String libNameKey)
Get native code library filename.
|
int |
getSubId()
Get sub-archive id for this archive.
|
java.util.Set<java.lang.String> |
listDir(java.lang.String path)
Get a BundleResourceStream to named entry inside an Archive.
|
java.lang.String |
toString()
Show file name for archive, if zip show if it is sub archive.
|
public java.lang.String toString()
toString
in class java.lang.Object
public BundleGeneration getBundleGeneration()
getBundleGeneration
in interface FileArchive
public int getSubId()
getSubId
in interface FileArchive
public byte[] getClassBytes(java.lang.String classFile) throws java.io.IOException
getClassBytes
in interface FileArchive
Class
- File to get.java.io.IOException
- if failed to read jar entry.public BundleResourceStream getBundleResourceStream(java.lang.String component)
getBundleResourceStream
in interface FileArchive
component
- Entry to get reference to.public java.util.Enumeration<java.lang.String> findResourcesPath(java.lang.String path)
FileArchive
String
objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument.findResourcesPath
in interface FileArchive
public java.util.Set<java.lang.String> listDir(java.lang.String path)
listDir
in interface FileArchive
component
- Entry to get reference to.public boolean exists(java.lang.String path, boolean onlyDirs)
exists
in interface FileArchive
component
- Entry to get reference to.public java.lang.String checkNativeLibrary(java.lang.String path)
checkNativeLibrary
in interface FileArchive
path
- Name of native code file to get.public java.lang.String getNativeLibrary(java.lang.String libNameKey)
getNativeLibrary
in interface FileArchive
libNameKey
- Key for native lib to get.