Best code examples for Java 8 ZipEntry class (java.util.zip.ZipEntry)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ZipEntry class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 ZipEntry examples from Open Source projects
This code example shows how to use the following methods: getSize
116:	Assert.assertNotNull("Report entry " + fileName + " missing from JDR report " + reportZip.getName(), entry); 
117:	Assert.assertTrue("Report entry " + fileName + " was empty or could not be determined", entry.getSize() > 0); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize
55:	ZipEntry ze = new ZipEntry("B7050028.class"); 
56:	ze.setMethod(ZipEntry.STORED); 
57:	ze.setSize(len); 
-
60:	ze.setCrc(crc.getValue()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
167:	out.putNextEntry(new ZipEntry("proguard_no_result")); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize
44:	ZipEntry zipEntry = new ZipEntry(name!=null?name: UUID.randomUUID().toString()); 
45:	zipEntry.setMethod(ZipOutputStream.STORED); 
-
47:	zipEntry.setSize(dataBuffer.length); 
-
50:	zipEntry.setCrc(crc32.getValue()); 
-
53:	zip.putArchiveEntry(new ZipArchiveEntry(zipEntry)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize, setTime
57:	JarEntry newEntry= new JarEntry(path.replace(File.separatorChar, '/')); 
-
63:	newEntry.setMethod(ZipEntry.STORED); 
64:	newEntry.setSize(zipEntry.getSize()); 
65:	newEntry.setCrc(zipEntry.getCrc()); 
-
71:	newEntry.setTime(lastModified); 
-
73:	addEntry(newEntry, zipFile.getInputStream(zipEntry)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getComment, getCrc, getMethod, getSize, getTime
77:	this.comment = zipEntry.getComment(); 
-
80:	this.size = zipEntry.getSize(); 
81:	this.crc32 = zipEntry.getCrc(); 
82:	this.time = zipEntry.getTime(); 
-
84:	final int method = zipEntry.getMethod(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getComment, getName, getSize, getTime
72:	this.comment = zipEntry.getComment(); 
73:	this.name = zipEntry.getName(); 
-
75:	this.size = zipEntry.getSize(); 
76:	this.time = zipEntry.getTime(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
94:	zos.putNextEntry(new ZipEntry(entryName)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setCompressedSize, setCrc, setMethod, setSize
371:	ZipEntry ze = new ZipEntry(resolvedPartUri); 
372:	ze.setMethod(ZipOutputStream.STORED); 
-
375:	ze.setSize(bytes.length); 
376:	ze.setCompressedSize(bytes.length); 
-
380:	ze.setCrc(crc.getValue()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getComment, getName, getSize, getTime
86:	this.entryName = IOUtils.getInstance().getFileName(zipEntry.getName()); 
87:	this.comment = zipEntry.getComment(); 
88:	this.size = zipEntry.getSize(); 
89:	this.time = zipEntry.getTime(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getName, getSize, getTime
100:	disposition.setFilename(entry.getName()); 
-
102:	setSize(entry.getSize()); 
103:	setModificationDate(new Date(entry.getTime())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCompressedSize, setMethod, setSize
153:	= new ZipEntry("xl/worksheets/sheet1.xml"); 
-
168:	theEntry.setSize(b.length); 
169:	theEntry.setCompressedSize(-1); 
170:	theEntry.setMethod(ZipEntry.DEFLATED); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getComment, getName, getSize, getTime
89:	this.comment = zipEntry.getComment(); 
90:	this.size = zipEntry.getSize(); 
91:	this.time = zipEntry.getTime(); 
-
93:	this.entryName = IOUtils.getInstance().getFileName(zipEntry.getName()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getCompressedSize, setCrc, setSize
159:	ZipEntry ze = new ZipEntry("test"); 
-
163:	ze.setCrc(tempCrc.getValue()); 
164:	ze.setSize(new String(data).length()); 
-
168:	long csize = ze.getCompressedSize(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getCompressedSize, getSize, setCompressedSize, setCrc, setMethod
295:	ZipEntry ze = new ZipEntry("okay1"); 
296:	ze.setMethod(ZipEntry.STORED); 
297:	ze.setCrc(crc.getValue()); 
-
299:	assertEquals(-1, ze.getSize()); 
300:	assertEquals(-1, ze.getCompressedSize()); 
-
302:	ze.setCompressedSize(0); 
-
304:	assertEquals(-1, ze.getSize()); 
305:	assertEquals(0, ze.getCompressedSize()); 
-
309:	assertEquals(0, ze.getSize()); 
310:	assertEquals(0, ze.getCompressedSize()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
68:	jstream.putNextEntry(new ZipEntry("foobaz.txt")); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize, setTime
57:	JarEntry newEntry= new JarEntry(path.replace(File.separatorChar, '/')); 
-
63:	newEntry.setMethod(ZipEntry.STORED); 
64:	newEntry.setSize(zipEntry.getSize()); 
65:	newEntry.setCrc(zipEntry.getCrc()); 
-
71:	newEntry.setTime(lastModified); 
-
73:	addEntry(newEntry, zipFile.getInputStream(zipEntry)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getComment, getName, getSize, getTime
72:	this.comment = zipEntry.getComment(); 
73:	this.name = zipEntry.getName(); 
-
75:	this.size = zipEntry.getSize(); 
76:	this.time = zipEntry.getTime(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getCrc
81:	long crc = ze.getCrc(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getComment, getCrc, getMethod, getSize, getTime
77:	this.comment = zipEntry.getComment(); 
-
80:	this.size = zipEntry.getSize(); 
81:	this.crc32 = zipEntry.getCrc(); 
82:	this.time = zipEntry.getTime(); 
-
84:	final int method = zipEntry.getMethod(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: isDirectory
31:	if (entry.isDirectory()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName, getSize, isDirectory
231:	log.debug("entry: " + entry.getName() + " size: " + entry.getSize()); 
232:	if (entry.isDirectory()) { 
233:	IOUtil.mkDirs(node, makeValidJCRPath(entry.getName(), false), getCollectionNodeType()); 
-
239:	ImportContext entryContext = new ZipEntryImportContext(context, entry, bin, node); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
128:	ZipEntry entry = new ZipEntry("resource.txt"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize
55:	ZipEntry ze = new ZipEntry("B7050028.class"); 
56:	ze.setMethod(ZipEntry.STORED); 
57:	ze.setSize(len); 
-
60:	ze.setCrc(crc.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setMethod, setTime
114:	JarEntry newEntry= new JarEntry(path.toString().replace(File.separatorChar, '/')); 
-
120:	newEntry.setMethod(ZipEntry.STORED); 
121:	JarPackagerUtil.calculateCrcAndSize(newEntry, new FileInputStream(file), new byte[4096]); 
-
124:	newEntry.setTime(file.lastModified()); 
125:	addEntry(newEntry, new FileInputStream(file)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName, isDirectory
98:	String fileName = jarEntry.getName(); 
-
111:	if (!jarEntry.isDirectory()) { 
112:	String name = jarEntry.getName(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getCrc
124:	long crc = ze.getCrc(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName, isDirectory
21:	ze = new ZipEntry("SOME_MACOSX_BUNDLE/"); 
22:	assertTrue(ze.isDirectory()); 
-
24:	assertTrue(ze.getName(),FileHelper.entryIsHidden(ze)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCompressedSize, setCrc, setMethod, setSize
93:	ZipEntry zipEntry = new ZipEntry(entryName); 
-
95:	zipEntry.setMethod(method); 
-
100:	zipEntry.setCrc(crc.getValue()); 
101:	zipEntry.setSize(inputBytes.length); 
102:	zipEntry.setCompressedSize(inputBytes.length); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setSize
477:	entry = new ZipEntry(JarFile.MANIFEST_NAME); 
478:	entry.setSize(manBytes.length); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getComment, getName, getSize, getTime
89:	this.comment = zipEntry.getComment(); 
90:	this.size = zipEntry.getSize(); 
91:	this.time = zipEntry.getTime(); 
-
93:	this.entryName = IOUtils.getInstance().getFileName(zipEntry.getName()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName
451:	Log.w(TAG, "extracting file: '" + ze.getName() + "'..."); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getComment, getCrc, getExtra, getName, getSize
393:	String name = inputEntry.getName(); 
-
395:	if (!(inputEntry.isDirectory() || name.endsWith(".class"))) { 
-
410:	outputEntry.setTime(inputEntry.getTime()); 
411:	outputEntry.setExtra(inputEntry.getExtra()); 
412:	outputEntry.setComment(inputEntry.getComment()); 
413:	outputEntry.setTime(inputEntry.getTime()); 
-
419:	outputEntry.setCrc(inputEntry.getCrc()); 
420:	outputEntry.setSize(inputEntry.getSize()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName
19:	return jarEntry.getName(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getComment, getCompressedSize, getCrc, getName, getTime
111:	ULog.d(TAG, "DumpZip name: " + ze.getName()); 
112:	ULog.d(TAG, "DumpZip Comment: " + ze.getComment()); 
113:	ULog.d(TAG, "DumpZip CompressedSize: " + ze.getCompressedSize()); 
114:	ULog.d(TAG, "DumpZip Crc: " + ze.getCrc()); 
115:	ULog.d(TAG, "DumpZip Time: " + ze.getTime()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize
15:	ZipEntry zipEntry = new ZipEntry(name!=null?name: UUID.randomUUID().toString()); 
16:	zipEntry.setMethod(ZipOutputStream.STORED); 
-
18:	zipEntry.setSize(dataBuffer.length); 
-
21:	zipEntry.setCrc(crc32.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName
119:	Guardian.assertNotNull("entry", entry); 
120:	return getZipEntryFileName(entry.getName()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getName, getSize, getTime
50:	this.nameInZip = entry.getName(); 
-
53:	size = entry.getSize(); 
54:	lastModified = entry.getTime(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCrc, setMethod, setSize
55:	ZipEntry ze = new ZipEntry("B7050028.class"); 
56:	ze.setMethod(ZipEntry.STORED); 
57:	ze.setSize(len); 
-
60:	ze.setCrc(crc.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setSize, setTime
52:	packageResource(embeddedJar, jarOutputStream, new JarEntry("lib/embedded.jar")); 
-
79:	entry.setSize(resourceBytes.length); 
80:	entry.setTime(System.currentTimeMillis()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setSize, setTime
119:	ZipEntry entry = new ZipEntry(entryName(file)); 
120:	entry.setTime(fs.modificationTime(file)); 
-
122:	entry.setSize(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setCompressedSize, setCrc, setMethod, setSize, setTime
124:	ZipEntry entry = new ZipEntry(path + '/'); 
125:	entry.setSize(0); 
126:	entry.setCompressedSize(0); 
127:	entry.setCrc(0); 
128:	entry.setMethod(ZipOutputStream.STORED); 
-
130:	entry.setTime(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setComment
39:	ZipEntry zipentry = new ZipEntry( entry.toString() ); 
40:	zipentry.setComment( "Compressed by Kettle" ); 
41:	( (ZipOutputStream) delegate ).putNextEntry( zipentry ); 
Full Snippet Info
6
CodeRank
Related Java 8 ZipEntry Questions & Answers:
See Code Examples for Java 8 ZipEntry Methods: