ZipItempublic class ZipItem extends Object This class encapsulates the two pieces of information required to make a
ZipEntry -- the "real" path, and the path you want to appear in the zip file |
Fields Summary |
---|
File | file | String | name |
Constructors Summary |
---|
public ZipItem(File file, String name)Construct a ZipItem
//if(!file.exists())
// throw new ZipFileException("File doesn't exist: " + file);
if(name == null || name.length() <= 0)
throw new ZipFileException("null or empty name for ZipItem");
this.file = file;
this.name = name;
|
Methods Summary |
---|
public java.io.File | getFile()Returns the actual file
return this.file;
| public java.lang.String | getName()Returns the zip entry name
return this.name;
| public java.lang.String | toString()Returns a String represenation of the real filename and the zip entry
name.
return "File: " + file.getPath() + ", name: " + name;
|
|