|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Archive
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(File directory)
add the content of the given directory into the root of the archive. |
void |
addDirectoryIn(String dirName,
File directory)
add the content of the given directory into the given directory of the archive. |
void |
addFile(File file)
add a lonely file into the root directory of the archive. |
void |
addFile(File file,
String name)
add a file into the root directory of the archive with a specified name. |
void |
addFileIn(String dirName,
File file)
add a lonely file into the given directory of the archive. |
void |
close()
Close this archive |
List |
getContainedFiles()
Returns a List of all files contained in this archive. |
InputStream |
getInputStream(String filename)
Returns an InputStream corresponding to the given filename. |
Manifest |
getManifest()
Returns the Manifest of the Archive. |
String |
getName()
Returns the name of the Archive. |
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 |
---|
void addDirectory(File directory)
directory
- directory to addvoid addDirectoryIn(String dirName, File directory)
dirName
- archive directory name.directory
- directory to add.void addFile(File file)
file
- the file to be added.void addFile(File file, String name)
file
- the file to be added.name
- filenamevoid addFileIn(String dirName, File file)
dirName
- archive directory name.file
- the file to be added.File getRootFile()
Manifest getManifest()
InputStream getInputStream(String filename) throws IOException
filename
- file name source of the InputStream
IOException
- When InputStream cannot be retrieved for filename.List getContainedFiles()
boolean isPacked()
String getName()
void close() throws IOException
IOException
- if close fail
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |