本文整理了Java中aQute.bnd.osgi.Jar.setCompression()
方法的一些代码示例,展示了Jar.setCompression()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jar.setCompression()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Jar
类名称:Jar
方法名:setCompression
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public void doChecksums(OutputStream out) throws Exception {
// ok, we have a request to create digests
// of the resources. Since we have to output
// the manifest first, we have a slight problem.
// We can also not make multiple passes over the resource
// because some resources are not idempotent and/or can
// take significant time. So we just copy the jar
// to a temporary file, read it in again, calculate
// the checksums and save.
String[] algs = algorithms;
algorithms = null;
try {
File f = File.createTempFile(padString(getName(), 3, '_'), ".jar");
write(f);
try (Jar tmp = new Jar(f)) {
tmp.setCompression(compression);
tmp.calcChecksums(algorithms);
tmp.write(out);
} finally {
IO.delete(f);
}
} finally {
algorithms = algs;
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public void doChecksums(OutputStream out) throws Exception {
// ok, we have a request to create digests
// of the resources. Since we have to output
// the manifest first, we have a slight problem.
// We can also not make multiple passes over the resource
// because some resources are not idempotent and/or can
// take significant time. So we just copy the jar
// to a temporary file, read it in again, calculate
// the checksums and save.
String[] algs = algorithms;
algorithms = null;
try {
File f = File.createTempFile(padString(getName(), 3, '_'), ".jar");
write(f);
try (Jar tmp = new Jar(f)) {
tmp.setCompression(compression);
tmp.calcChecksums(algorithms);
tmp.write(out);
} finally {
IO.delete(f);
}
} finally {
algorithms = algs;
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
jar.setCompression(Jar.Compression.STORE);
内容来源于网络,如有侵权,请联系作者删除!