Constructor and Description |
---|
ZipUtil.Packer() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
open(File outputFile) |
void |
packDirectory(File dir,
String rootPath)
Creates a zip file for the contents of the specified directory
|
void |
packEntryFromStream(String name,
InputStream is,
long lastModified)
Adds the content from the input stream to the specified file entry in the zip file
|
public void open(File outputFile) throws IOException
IOException
public void close() throws IOException
IOException
public void packDirectory(File dir, String rootPath) throws IOException
dir
- the File
object for the directory to packrootPath
- the root path of the content within the bundleIOException
public void packEntryFromStream(String name, InputStream is, long lastModified) throws IOException
name
- the zip entry name of the fileis
- the input stream for the file contentslastModified
- the last modified time of the entryIOException
Copyright © 2011-2015 IBM. All Rights Reserved.