private void writeEntriesToArchive(ZipOutputStream archiveStream) throws IOException { File manifestFile = entries.get(JarFile.MANIFEST_NAME); // Always write the jar manifest as the first entry, if it exists... if(manifestFile != null) { byte[] manifest = FileUtils.readFile(manifestFile); writeEntry(JarFile.MANIFEST_NAME, manifest, archiveStream); } Set<Map.Entry<String, File>> entrySet = entries.entrySet(); for (Map.Entry<String, File> entry : entrySet) { if(!entry.getKey().equals(JarFile.MANIFEST_NAME)) { File file = entry.getValue(); if (file != null && !file.isDirectory()) { writeEntry(entry.getKey(), FileUtils.readFile(file), archiveStream); } else { writeEntry(entry.getKey(), null, archiveStream); } } } }
private void writeEntriesToArchive(ZipOutputStream archiveStream) throws IOException { File manifestFile = entries.get(JarFile.MANIFEST_NAME); // Always write the jar manifest as the first entry, if it exists... if(manifestFile != null) { byte[] manifest = FileUtils.readFile(manifestFile); writeEntry(JarFile.MANIFEST_NAME, manifest, archiveStream); } Set<Map.Entry<String, File>> entrySet = entries.entrySet(); for (Map.Entry<String, File> entry : entrySet) { if(!entry.getKey().equals(JarFile.MANIFEST_NAME)) { File file = entry.getValue(); if (file != null && !file.isDirectory()) { writeEntry(entry.getKey(), FileUtils.readFile(file), archiveStream); } else { writeEntry(entry.getKey(), null, archiveStream); } } } }
private void writeEntriesToArchive(ZipOutputStream archiveStream) throws IOException { File manifestFile = entries.get(JarFile.MANIFEST_NAME); // Always write the jar manifest as the first entry, if it exists... if(manifestFile != null) { byte[] manifest = FileUtils.readFile(manifestFile); writeEntry(JarFile.MANIFEST_NAME, manifest, archiveStream); } Set<Map.Entry<String, File>> entrySet = entries.entrySet(); for (Map.Entry<String, File> entry : entrySet) { if(!entry.getKey().equals(JarFile.MANIFEST_NAME)) { File file = entry.getValue(); if (file != null && !file.isDirectory()) { writeEntry(entry.getKey(), FileUtils.readFile(file), archiveStream); } else { writeEntry(entry.getKey(), null, archiveStream); } } } }