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.Objectpublic BundleGeneration getBundleGeneration()
getBundleGeneration in interface FileArchivepublic int getSubId()
getSubId in interface FileArchivepublic byte[] getClassBytes(java.lang.String classFile)
throws java.io.IOException
getClassBytes in interface FileArchiveClass - File to get.java.io.IOException - if failed to read jar entry.public BundleResourceStream getBundleResourceStream(java.lang.String component)
getBundleResourceStream in interface FileArchivecomponent - Entry to get reference to.public java.util.Enumeration<java.lang.String> findResourcesPath(java.lang.String path)
FileArchiveString objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument.findResourcesPath in interface FileArchivepublic java.util.Set<java.lang.String> listDir(java.lang.String path)
listDir in interface FileArchivecomponent - Entry to get reference to.public boolean exists(java.lang.String path,
boolean onlyDirs)
exists in interface FileArchivecomponent - Entry to get reference to.public java.lang.String checkNativeLibrary(java.lang.String path)
checkNativeLibrary in interface FileArchivepath - Name of native code file to get.public java.lang.String getNativeLibrary(java.lang.String libNameKey)
getNativeLibrary in interface FileArchivelibNameKey - Key for native lib to get.