本文整理了Java中aQute.lib.osgi.Jar.doManifest()
方法的一些代码示例,展示了Jar.doManifest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jar.doManifest()
方法的具体详情如下:
包路径:aQute.lib.osgi.Jar
类名称:Jar
方法名:doManifest
暂无
代码示例来源:origin: biz.aQute/aQute.bnd
public void write(OutputStream out) throws IOException {
ZipOutputStream jout = nomanifest ? new ZipOutputStream(out) : new JarOutputStream(out);
Set<String> done = new HashSet<String>();
Set<String> directories = new HashSet<String>();
if (doNotTouchManifest) {
writeResource(jout, directories, "META-INF/MANIFEST.MF",
getResource("META-INF/MANIFEST.MF"));
done.add("META-INF/MANIFEST.MF");
} else if (!nomanifest)
doManifest(done, jout);
for (Map.Entry<String, Resource> entry : getResources().entrySet()) {
// Skip metainf contents
if (!done.contains(entry.getKey()))
writeResource(jout, directories, (String) entry.getKey(),
(Resource) entry.getValue());
}
jout.finish();
}
代码示例来源:origin: biz.aQute/bnd
public void write(OutputStream out) throws Exception {
ZipOutputStream jout = nomanifest || doNotTouchManifest ? new ZipOutputStream(out)
: new JarOutputStream(out);
Set<String> done = new HashSet<String>();
Set<String> directories = new HashSet<String>();
if (doNotTouchManifest) {
Resource r = getResource("META-INF/MANIFEST.MF");
if (r != null) {
writeResource(jout, directories, "META-INF/MANIFEST.MF", r);
done.add("META-INF/MANIFEST.MF");
}
} else
doManifest(done, jout);
for (Map.Entry<String, Resource> entry : getResources().entrySet()) {
// Skip metainf contents
if (!done.contains(entry.getKey()))
writeResource(jout, directories, (String) entry.getKey(),
(Resource) entry.getValue());
}
jout.finish();
}
内容来源于网络,如有侵权,请联系作者删除!