Code example for ZipEntry

Methods: getNamesetTime

0
	} 
 
 
 
	private void add(ZipOutputStream zos, InputStream is, String path, long lastMod, boolean closeInput) throws IOException {
		ZipEntry ze=new ZipEntry(path);
		ze.setTime(lastMod);
		add(zos, ze, is, closeInput);
	} 
	 
	private void add(ZipOutputStream zos, ZipEntry entry,InputStream is, boolean closeInput) throws IOException {
		if(alreadyUsed==null)alreadyUsed=new HashSet<String>();
		else if(alreadyUsed.contains(entry.getName())) return;
		zos.putNextEntry(entry);
        try { 
            IOUtil.copy(is,zos,closeInput,false);
        }  
        finally { 
            zos.closeEntry();
        } 
		alreadyUsed.add(entry.getName());
	} 
 
 
 
	@Override 
Experience pair programming with AI  Get Codota for Java