Java Code Examples for java.util.jar.JarOutputStream#setComment()

The following examples show how to use java.util.jar.JarOutputStream#setComment() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ArchiveTask.java    From ghidra with Apache License 2.0 6 votes vote down vote up
/**
 * Write project out to the jar file.
 * @param monitor monitor that can be cancelled
 * @return true if no errors occurred within the JarWriter object
 * @throws IOException
 */
private boolean writeProject(TaskMonitor monitor) throws IOException {
	boolean ok = false;

	JarOutputStream jarOut = new JarOutputStream(new FileOutputStream(jarFile));
	// exclude the lock files on programs
	JarWriter writer = new JarWriter(jarOut, new String[] { ArchivePlugin.DB_LOCK_EXT });
	String archiveComment = "Ghidra archive file for " + projectName + " project.";
	jarOut.setComment(archiveComment);
	// write the .gpr file 
	File projectFile = project.getProjectLocator().getMarkerFile();
	ok = writer.outputFile(projectFile, "", monitor);
	if (ok) {
		// write an indicator that this is jar format vs writing XML files
		ZipEntry entry = new ZipEntry(ArchivePlugin.JAR_VERSION_TAG);
		jarOut.putNextEntry(entry);

		ok = writeProjectDirs(writer, monitor);

	}
	jarOut.close();
	return ok;
}
 
Example 2
Source File: Utils.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 3
Source File: Utils.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 4
Source File: Utils.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 5
Source File: Utils.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 6
Source File: Utils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 7
Source File: Utils.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 8
Source File: Utils.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 9
Source File: Utils.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 10
Source File: Utils.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 11
Source File: Utils.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 12
Source File: Utils.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 13
Source File: Utils.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
 
Example 14
Source File: Utils.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
static void markJarFile(JarOutputStream out) throws IOException {
    out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}