FileDocCategorySizeDatePackage
ZipItem.javaAPI DocGlassfish v2 API4081Fri May 04 22:23:16 BST 2007com.sun.enterprise.config.backup.util

ZipItem

public 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

param
file The actual file
param
name The zip entry name - i.e. the relative path in the zip file
throws
ZipFileException

		//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.FilegetFile()
Returns the actual file

return
the actual file

        return this.file;
    
public java.lang.StringgetName()
Returns the zip entry name

return
the zip entry name

        return this.name;
    
public java.lang.StringtoString()
Returns a String represenation of the real filename and the zip entry name.

return
String with the path and the zip entry name

		return "File: " + file.getPath() + ", name: " + name;