Code example for ZipEntry

Methods: setTime

0
    } 
     
    private static void compressZip(String parent, Resource source, ZipOutputStream zos, ResourceFilter filter) throws IOException {
    	if(source.isFile()) {
    		//if(filter.accept(source)) { 
	    		ZipEntry ze=new ZipEntry(parent);
	    		ze.setTime(source.lastModified());
	    		zos.putNextEntry(ze);
	            try { 
	                IOUtil.copy(source,zos,false);
	            }  
	            finally { 
	                zos.closeEntry();
	            } 
    		//} 
        } 
        else if(source.isDirectory()) {
        	if(!StringUtil.isEmpty(parent)) {
        		ZipEntry ze=new ZipEntry(parent+"/");
        		ze.setTime(source.lastModified());
Contextual code suggestions in your IDE  Get Codota for Java