Code example for ZipEntry

0
		} else if (pathname.segmentCount() == 1) {
			parent = root;
		} else { 
			parent = createContainer(pathname.removeLastSegments(1));
		} 
		ZipEntry newEntry = new ZipEntry(pathname.toString());
		directoryEntryCache.put(pathname, newEntry);
		List childList = new ArrayList();
		children.put(newEntry, childList);
 
		List parentChildList = (List) children.get(parent);
		parentChildList.add(newEntry);
		return newEntry;
	} 
 
	/** 
	 * Creates a new file zip entry with the specified name. 
	 */ 
	protected void createFile(ZipEntry entry) {
		IPath pathname = new Path(entry.getName());