Class Overview
Simple utility functions for dealing with zip files.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
Public Methods
public
static
InputStream
streamForZipFileEntry
(File zipFile, String entryName)
Retrieves an input stream reading from a named entry in a zip file.
Parameters
zipFile
| the path to the zip file. |
entryName
| the name of the entry to which an input stream should be returned. |
Returns
- an input stream reading from the named entry in the specified file.
Throws
IOException
| if the zip file is unreadable, or if it does not contained the named entry.
|
public
static
void
unzip
(File input, File outputDir)
Expand a Zip file into a directory.
Parameters
input
| Zip file to be expanded |
outputDir
| Target directory. Files will be overwritten |
public
static
void
zip
(File inputDir, File output)
Zip a directory into a file.
Parameters
inputDir
| Directory to be compressed. |
output
| Target file for the zip contents. If the file exists it will be overwritten. |