|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knopflerfish.framework.bundlestorage.file.Archive
public class Archive
JAR file handling.
Constructor Summary | |
---|---|
Archive(java.io.File dir,
int rev,
java.io.InputStream is,
java.net.URL source,
java.lang.String location,
boolean checkSigned)
Create an Archive based on contents of an InputStream, the archive is saved as local copy in the specified directory. |
Method Summary | |
---|---|
java.util.Enumeration |
findResourcesPath(java.lang.String path)
|
java.lang.String |
getAttribute(java.lang.String key)
Get an attribute from the manifest of the archive. |
byte[] |
getClassBytes(java.lang.String classFile)
Get a byte array containg the contents of named class file from the archive. |
java.io.InputStream |
getInputStream(java.lang.String component)
Get an InputStream to named entry inside an Archive. |
java.util.jar.Manifest |
getManifest()
Get manifest for this archive. |
FileArchive |
getSubArchive(java.lang.String path)
Get an Archive handle to a named Jar file within this archive. |
void |
removeCertificates()
|
void |
saveCertificates()
|
java.lang.String |
toString()
Show file name for archive, if zip show if it is sub archive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Archive(java.io.File dir, int rev, java.io.InputStream is, java.net.URL source, java.lang.String location, boolean checkSigned) throws java.io.IOException, BundleException
storage
- BundleStorageImpl for this archive.dir
- Directory to save data in.rev
- Revision of bundle content (used for updates).is
- Jar file data in an InputStream.url
- URL to use to CodeSource.location
- Location for archivecheckSigned
- Check signed bundles
java.io.IOException
BundleException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getAttribute(java.lang.String key)
getAttribute
in interface FileArchive
key
- Name of attribute to get.
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 java.util.Enumeration findResourcesPath(java.lang.String path)
findResourcesPath
in interface FileArchive
public FileArchive getSubArchive(java.lang.String path) throws java.io.IOException
getSubArchive
in interface FileArchive
path
- Name of Jar file to get.
java.io.FileNotFoundException
- if no such Jar file in archive.
java.io.IOException
- if failed to read Jar file.public java.io.InputStream getInputStream(java.lang.String component)
FileArchive
getInputStream
in interface FileArchive
component
- Entry to get reference to.
public java.util.jar.Manifest getManifest()
FileArchive
getManifest
in interface FileArchive
public void saveCertificates() throws java.io.IOException
java.io.IOException
public void removeCertificates()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |