Code example for ZipEntry

0
        if (childList == null) {
            childList = new ArrayList();
            children.put(parent, childList);
        } 
 
        childList.add(child);
    } 
 
    /** 
     * Creates a new container zip entry with the specified name, iff 
     * it has not already been created. 
     */ 
    protected void createContainer(IPath pathname) {
        if (directoryEntryCache.containsKey(pathname)) {
			return; 
		} 
 
        ZipEntry parent;
        if (pathname.segmentCount() == 1) {
			parent = root;
		} else { 
			parent = (ZipEntry) directoryEntryCache.get(pathname
                    .removeLastSegments(1)); 
		} 
 
        ZipEntry newEntry = new ZipEntry(pathname.toString());
        directoryEntryCache.put(pathname, newEntry);
        addToChildren(parent, newEntry);
    } 
 
    /** 
     * Creates a new file zip entry with the specified name.