All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gnu.bytecode.ZipArchive

java.lang.Object
   |
   +----gnu.bytecode.ZipArchive

public class ZipArchive
extends Object
A class to manipulate a .zip archive. Does not handle compression/uncompression, though that could be added. When used an an application. provides a simplified tar-like interface.

Author:
Per Bothner

Constructor Index

 o ZipArchive(File, String)
 o ZipArchive(String, String)

Method Index

 o append(byte[], byte[])
 o append(String, byte[])
 o close()
 o find(String)
Return a directory entry with the given name, or null if not found.
 o main(String[])
Manipulate a .zip archive using a tar-like interface.
 o size()

Constructors

 o ZipArchive
 public ZipArchive(String name,
                   String mode) throws IOException
 o ZipArchive
 public ZipArchive(File file,
                   String mode) throws IOException

Methods

 o find
 public ZipMember find(String name)
Return a directory entry with the given name, or null if not found.

 o size
 public int size()
 o close
 public void close() throws IOException
 o append
 public ZipMember append(String name,
                         byte contents[]) throws IOException
 o append
 public ZipMember append(byte name[],
                         byte contents[]) throws IOException
 o main
 public static void main(String args[]) throws IOException
Manipulate a .zip archive using a tar-like interface.

Usage: ZipArchive command archive [file ...]

ZipArchive t archive file ...
List information about the named members of the archive.
ZipArchive x archive file ...
Extract the named members from the archive.
ZipArchive p archive file ...
Print the named members from the archive on standard output. Prints just the raw contents, with no headers or conversion.
ZipArchive [ptx] archive
With no arguments, does each command for every member in the archive.
ZipArchive q archive file ...
Add the named files to the end of archive. Does not check for duplicates.


All Packages  Class Hierarchy  This Package  Previous  Next  Index