public static class ZipFileList.FileEntry extends Object implements ZipFileList.ZipFileEntry
| Modifier and Type | Field and Description |
|---|---|
protected File |
file
The file being zipped.
|
protected File |
root
The root file to base the entry paths on.
|
| Constructor and Description |
|---|
FileEntry(File file)
Constructor.
|
FileEntry(File root,
File file)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFile(ZipOutputStream zos,
File f)
Adds the specified file to the specified output stream.
|
boolean |
doAdd(File f)
Subclasses can override this method to customize which files get added to a zip file.
|
void |
write(ZipOutputStream zos)
Write this entry to the specified output stream.
|
public FileEntry(File root, File file)
root - The root file that represents the base path.file - The file to add to the zip file.public void write(ZipOutputStream zos) throws IOException
ZipFileList.ZipFileEntrywrite in interface ZipFileList.ZipFileEntryzos - The output stream to write to.IOExceptionpublic boolean doAdd(File f)
f - The file being added to the zip file.protected void addFile(ZipOutputStream zos, File f) throws IOException
zos - The output stream.f - The file to add.IOExceptionCopyright © 2018 Apache. All rights reserved.