Methods Summary |
---|
public void | close()close the abstract archive
|
public void | closeEntry()close a previously returned @see java.io.OutputStream returned
by an addEntry call
|
public void | closeEntry(com.sun.enterprise.deployment.deploy.shared.AbstractArchive os)close a previously returned @see java.io.OutputStream returned
by an addEntry call
|
public boolean | delete()delete the archive
return false;
|
public java.util.Enumeration | entries()
Vector entries = new Vector();
try {
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(file));
ZipEntry ze;
while ((ze=jis.getNextEntry())!=null) {
entries.add(ze.getName());
}
jis.close();
} catch(IOException ioe) {
ioe.printStackTrace();
}
return entries.elements();
|
public java.util.Enumeration | entries(java.util.Enumeration embeddedArchives)
// jar file are not recursive
return entries();
|
public boolean | exists()
return false;
|
public long | getArchiveSize()Get the size of the archive
return(file.length);
|
public java.lang.String | getArchiveUri()
return null;
|
public byte[] | getByteArray()
return file;
|
public com.sun.enterprise.deployment.deploy.shared.AbstractArchive | getEmbeddedArchive(java.lang.String name)create or obtain an embedded archive within this abstraction.
InputStream is = getEntry(name);
if (is!=null) {
AbstractArchive archive = new MemoryMappedArchive(is);
is.close();
return archive;
}
return null;
|
public java.io.InputStream | getEntry(java.lang.String name)
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(file));
ZipEntry ze;
while ((ze=jis.getNextEntry())!=null) {
if (ze.getName().equals(name))
return new BufferedInputStream(jis);
}
return null;
|
public java.util.jar.Manifest | getManifest()
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(file));
Manifest m = jis.getManifest();
jis.close();
return m;
|
public java.net.URI | getURI()
return null;
|
public void | open(java.lang.String path)
File in = new File(path);
if (!in.exists()) {
throw new FileNotFoundException(path);
}
FileInputStream is = new FileInputStream(in);
read(is);
|
public java.io.OutputStream | putNextEntry(java.lang.String name)
return null;
|
private void | read(java.io.InputStream is)
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ArchivistUtils.copy(new BufferedInputStream(is), new BufferedOutputStream(baos));
file = baos.toByteArray();
|
public boolean | renameTo(java.lang.String name)rename the archive
return false;
|