下面列出了java.util.jar.JarOutputStream#setComment ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 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;
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}
static void markJarFile(JarOutputStream out) throws IOException {
out.setComment(PACK_ZIP_ARCHIVE_MARKER_COMMENT);
}