| java.lang.Object | |
| ↳ | org.ops4j.pax.exam.spi.war.ZipBuilder |
Builds a ZIP archive from individual files and directories.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a ZIP archive in the given file.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Recursively adds a directory tree to the archive.
| |||||||||||
Adds a file to the archive.
| |||||||||||
Closes the archive and releases file system resources.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a ZIP archive in the given file. Allocates underlying file system resources. The user
must call close() to release these resources.
| IOException |
|---|
Recursively adds a directory tree to the archive. The archive must not be closed.
Example:
sourceDir = /opt/work/classes targetDir = WEB-INF/classes /opt/work/classes/com/acme/Foo.class -> WEB-INF/classes/com/acme/Foo.class
| sourceDir | Root directory of tree to be added |
|---|---|
| targetDir | Relative path within the archive corresponding to root. Regardless of the OS, this path must use slashes ('/') as separators. |
| IOException |
|---|
Adds a file to the archive. The archive must not be closed.
Example:
sourceFile = C:\opt\work\deps\foo.jar targetDir = WEB-INF/lib/foo.jar
| sourceFile | File to be added |
|---|
| IOException |
|---|
Closes the archive and releases file system resources. No more files or directories may be added after calling this method.
| IOException |
|---|