Code example for ZipEntry

Methods: getNameisDirectory

0
 
	protected void loadEntry(File parent, ZipFile zipFile, ZipEntry entry)
			throws IOException, FileNotFoundException { 
		InputStream is = null;
		FileOutputStream os = null;
		String entryName = entry.getName();
		File entryFile = new File(parent, entryName);
		if (entry.isDirectory()) {
			entryFile.mkdirs();
		} else { 
			File entryDir = entryFile.getParentFile();
			if (entryDir != null && !entryDir.exists()) {
				entryDir.mkdirs();
			} 
			is = zipFile.getInputStream(entry);
			os = new FileOutputStream(entryFile);
			StreamTools.copyStream(is, os);
		} 
	} 
 
Experience pair programming with AI  Get Codota for Java