|
|||||||||
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(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 |
---|
void addDirectory(java.io.File directory)
directory
- directory to addvoid addDirectoryIn(java.lang.String dirName, java.io.File directory)
dirName
- archive directory name.directory
- directory to add.void addFile(java.io.File file)
file
- the file to be added.void addFile(java.io.File file, java.lang.String name)
file
- the file to be added.name
- filenamevoid addFileIn(java.lang.String dirName, java.io.File file)
dirName
- archive directory name.file
- the file to be added.java.io.File getRootFile()
java.util.jar.Manifest getManifest()
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.java.util.List getContainedFiles()
boolean isPacked()
java.lang.String getName()
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 |