本文整理了Java中net.java.trueupdate.core.zip.diff.ZipDiff
类的一些代码示例,展示了ZipDiff
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipDiff
类的具体详情如下:
包路径:net.java.trueupdate.core.zip.diff.ZipDiff
类名称:ZipDiff
[英]Compares two archives entry by entry. Archives may be ZIP, JAR, EAR or WAR files.
[中]逐条比较两个归档。档案可以是ZIP、JAR、EAR或WAR文件。
代码示例来源:origin: net.java.trueupdate/trueupdate-jax-rs-server
final ZipFile zip2 = new ZipFile(file2);
try {
ZipDiff.builder()
.archive1(zip1)
.archive2(zip2)
.build()
.writePatchArchiveTo(output);
} catch (IOException ex2) {
throw ex = ex2;
代码示例来源:origin: net.java.trueupdate/trueupdate-jaxrs-server
@Override public void write(final @WillNotClose OutputStream out)
throws IOException {
class DiffSink implements ZipSink {
@Override public ZipOutput output() throws IOException {
return new ZipOutputStreamAdapter(new ZipOutputStream(out) {
@Override public void close() throws IOException {
super.finish();
}
});
}
} // DiffSink
ZipDiff .builder()
.input1(input1)
.input2(input2)
.build()
.output(new DiffSink());
}
};
内容来源于网络,如有侵权,请联系作者删除!