Code example for ZipEntry

Methods: getNamegetSize

0
    public boolean exists() { 
        if ("".equals(getName()))
            return true; 
        // ZipEntry re = zipFile.getEntry(entry.getName()); 
        // return re != null; 
        return entry.getSize() != -1;
    } 
 
    @Override 
    public List<Entity> getChildren() {
        List<Entity> result = null;
 
        if (isDirectory()) { 
            result = new ArrayList<Entity>();
            Enumeration<? extends ZipEntry> entries = zipFile.entries();
            String n = entry.getName();
            while (entries.hasMoreElements()) {
                ZipEntry e = entries.nextElement();
                if (e.getName().startsWith(n)
                        && e.getName().length() != n.length())
                    result.add(new ZipEntryEntity(zipFile, e,
                            getMetadataService())); 
            } 
        } 
 
        return result; 
    } 
 
    @Override 
    public String getName() {
        return entry.getName();
    } 
 
    @Override 
    public Entity getParent() { 
        if ("".equals(entry.getName()))
Contextual code suggestions in your IDE  Get Codota for Java