aQute.lib.osgi.Jar.writeManifest()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中aQute.lib.osgi.Jar.writeManifest()方法的一些代码示例,展示了Jar.writeManifest()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jar.writeManifest()方法的具体详情如下:
包路径:aQute.lib.osgi.Jar
类名称:Jar
方法名:writeManifest

Jar.writeManifest介绍

[英]Cleanup the manifest for writing. Cleaning up consists of adding a space after any \n to prevent the manifest to see this newline as a delimiter.
[中]清理清单以进行写入。清理包括在任何空格后添加空格,\n以防止清单将此换行符视为分隔符。

代码示例

代码示例来源:origin: biz.aQute/aQute.bnd

private void doManifest(Set<String> done, ZipOutputStream jout)
    throws IOException {
  if ( nomanifest )
    return;
  
  JarEntry ze = new JarEntry("META-INF/MANIFEST.MF");
  jout.putNextEntry(ze);
  writeManifest(jout);
  jout.closeEntry();
  done.add(ze.getName());
}

代码示例来源:origin: biz.aQute/bnd

private void doManifest(Set<String> done, ZipOutputStream jout) throws Exception {
  if (nomanifest)
    return;
  JarEntry ze = new JarEntry("META-INF/MANIFEST.MF");
  jout.putNextEntry(ze);
  writeManifest(jout);
  jout.closeEntry();
  done.add(ze.getName());
}

代码示例来源:origin: biz.aQute/aQute.bnd

/**
 * Cleanup the manifest for writing. Cleaning up consists of adding a space
 * after any \n to prevent the manifest to see this newline as a delimiter.
 * 
 * @param out
 *            Output
 * @throws IOException
 */
public void writeManifest(OutputStream out) throws IOException {
  writeManifest(getManifest(), out);
}

代码示例来源:origin: biz.aQute/bnd

/**
 * Cleanup the manifest for writing. Cleaning up consists of adding a space
 * after any \n to prevent the manifest to see this newline as a delimiter.
 * 
 * @param out
 *            Output
 * @throws IOException
 */
public void writeManifest(OutputStream out) throws Exception {
  writeManifest(getManifest(), out);
}

代码示例来源:origin: biz.aQute/bnd

/**
 * Get the manifest and write it out separately if -savemanifest is set
 * 
 * @param dot
 */
private void doSaveManifest(Jar dot) throws Exception {
  String output = getProperty(SAVEMANIFEST);
  if (output == null)
    return;
  File f = getFile(output);
  if (f.isDirectory()) {
    f = new File(f, "MANIFEST.MF");
  }
  f.delete();
  f.getParentFile().mkdirs();
  OutputStream out = new FileOutputStream(f);
  try {
    Jar.writeManifest(dot.getManifest(), out);
  } finally {
    out.close();
  }
  changedFile(f);
}

相关文章