lapisx.io
Class ZipArchive
java.lang.Object
lapisx.io.ZipArchive
- All Implemented Interfaces:
- Serializable
- public class ZipArchive
- extends Object
- implements Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZipArchive
public ZipArchive(String[] filenames)
throws IOException
ZipArchive
public ZipArchive(InputStream in)
throws IOException
ZipArchive
public ZipArchive(InputStream in,
int length)
throws IOException
getNames
public String[] getNames()
filenameAt
public String filenameAt(int i)
getFilenameCount
public int getFilenameCount()
length
public int length()
getInputStream
public InputStream getInputStream()
extract
public void extract(String directory)
throws IOException
- Extract ZIP archive entries to the filesystem.
Each destination filename is computed by prefixing
the ZIP entry name with directory.
- Parameters:
directory
- Directory where files should be placed.
Null or empty string means current directory. If directory
is non-empty and doesn't end with a file separator like / or \,
then a file separator is added automatically.
- Throws:
IOException
extract
public void extract(String directory,
PrintStream nameStream)
throws IOException
- Throws:
IOException
extract
public void extract(String directory,
String[] names)
throws IOException
- Throws:
IOException
extract
public void extract(String directory,
String[] names,
PrintStream nameStream)
throws IOException
- Throws:
IOException
extractToTempDir
public String[] extractToTempDir()
throws IOException
- Throws:
IOException
extractToTempDir
public String[] extractToTempDir(String[] names)
throws IOException
- Throws:
IOException