|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An Archive is a Wrapper around a Jar file (ear, war, jar) or
around a directory structured lik a Jar file (unpacked jar file for example).
| Method Summary | |
void |
addDirectory(java.io.File directory)
add the content of the given directory into the root of the archive. |
void |
addDirectoryIn(java.lang.String dirName,
java.io.File directory)
add the content of the given directory into the given directory of the archive. |
void |
addFile(java.io.File file)
add a lonely file into the root directory of the archive. |
void |
addFile(java.io.File file,
java.lang.String name)
add a file into the root directory of the archive with a specified name. |
void |
addFileIn(java.lang.String dirName,
java.io.File file)
add a lonely file into the given directory of the archive. |
void |
close()
Close this archive |
java.util.List |
getContainedFiles()
Returns a List of all files contained in this archive. |
java.io.InputStream |
getInputStream(java.lang.String filename)
Returns an InputStream corresponding to the given filename. |
java.util.jar.Manifest |
getManifest()
Returns the Manifest of the Archive. |
java.lang.String |
getName()
Returns the name of the Archive. |
java.io.File |
getRootFile()
Returns the File corresponding to the root of the archive. |
boolean |
isPacked()
Returns true if archive is packed or false if archive is unpacked. |
| Method Detail |
public void addDirectory(java.io.File directory)
directory - directory to add
public void addDirectoryIn(java.lang.String dirName,
java.io.File directory)
dirName - archive directory name.directory - directory to add.public void addFile(java.io.File file)
file - the file to be added.
public void addFile(java.io.File file,
java.lang.String name)
file - the file to be added.name - filename
public void addFileIn(java.lang.String dirName,
java.io.File file)
dirName - archive directory name.file - the file to be added.public java.io.File getRootFile()
public java.util.jar.Manifest getManifest()
public java.io.InputStream getInputStream(java.lang.String filename)
throws java.io.IOException
filename - file name source of the InputStream
java.io.IOException - When InputStream cannot be retrieved for filename.public java.util.List getContainedFiles()
public boolean isPacked()
public java.lang.String getName()
public void close()
throws java.io.IOException
java.io.IOException - if close fail
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||