Package gnu.bytecode
Class ZipArchive
- java.lang.Object
-
- gnu.bytecode.ZipArchive
-
public class ZipArchive extends java.lang.ObjectA 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.
-
-
Constructor Summary
Constructors Constructor Description ZipArchive()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longcopy(java.io.InputStream in, java.io.OutputStream out, byte[] buffer)static voidcopy(java.io.InputStream in, java.lang.String name, byte[] buffer)static voidmain(java.lang.String[] args)Manipulate a .zip archive using a tar-like interface.
-
-
-
Method Detail
-
copy
public static long copy(java.io.InputStream in, java.io.OutputStream out, byte[] buffer) throws java.io.IOException- Throws:
java.io.IOException
-
copy
public static void copy(java.io.InputStream in, java.lang.String name, byte[] buffer) throws java.io.IOException- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.io.IOExceptionManipulate a .zip archive using a tar-like interface.Usage:
ZipArchivecommand archive [file ...]ZipArchive tarchive file ...- List information about the named members of the archive.
ZipArchive xarchive file ...- Extract the named members from the archive.
ZipArchive parchive 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 qarchive file ...- Add the named files to the end of archive. Does not check for duplicates.
- Throws:
java.io.IOException
-
-