Construct a ZipItemparamfile The actual fileparamname The zip entry name - i.e. the relative path in the zip filethrowsZipFileException //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;
//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;
Returns the actual filereturnthe actual file return this.file;
return this.file;
Returns the zip entry namereturnthe zip entry name return this.name;
return this.name;
Returns a String represenation of the real filename and the zip entry name.returnString with the path and the zip entry name return "File: " + file.getPath() + ", name: " + name;
return "File: " + file.getPath() + ", name: " + name;