本文整理了Java中de.schlichtherle.truezip.fs.archive.zip.ZipOutputShop
类的一些代码示例,展示了ZipOutputShop
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipOutputShop
类的具体详情如下:
包路径:de.schlichtherle.truezip.fs.archive.zip.ZipOutputShop
类名称:ZipOutputShop
[英]An output shop for writing ZIP files. This output shop can only write one entry at a time. Archive drivers may wrap this class in a MultiplexedOutputShop to overcome this limitation.
[中]用于编写ZIP文件的输出商店。这个输出商店一次只能写一个条目。归档驱动程序可以将此类封装在MultiplexedOutShop中以克服此限制。
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-tzp
/**
* This implementation returns a new {@link ZipOutputShop}.
* This restricts the number of concurrent output entry streams to one in
* order to inhibit writing unencrypted temporary files for buffering the
* written entries.
*/
@Override
protected OutputShop<ZipDriverEntry> newOutputShop(
FsModel model,
OutputStream out,
ZipInputShop source)
throws IOException {
return new ZipOutputShop(this, model, out, source);
}
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
@Override
@DischargesObligation
public void close() throws IOException {
if (closed) return;
closed = true;
closeEntry();
}
} // EntryOutputStream
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
final @CheckForNull ZipCryptoParameters zipCryptoParameters(ZipOutputShop output) {
return zipCryptoParameters(output.getModel(), output.getRawCharset());
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
try {
final ZipOutputShop zos = ZipOutputShop.this;
zos.putNextEntry(local);
try {
Streams.cat(in, zos);
zos.closeEntry();
} catch (final IOException ex) {
builder.warn(ex);
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
final long ol = length();
final long ipl = input.getLocalTarget().getSize(DATA);
if ((ol + ipl) % 4 != 0)
write(new byte[4 - (int) (ol % 4)]);
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
@CreatesObligation
@edu.umd.cs.findbugs.annotations.SuppressWarnings("OBL_UNSATISFIED_OBLIGATION")
EntryOutputStream(final ZipDriverEntry entry, final boolean process)
throws IOException {
super(ZipOutputShop.this);
putNextEntry(entry, process);
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
void updateProperties() {
final ZipDriverEntry local = this.local;
final IOPool.Entry<?> buffer = this.buffer;
local.setCrc(((CheckedOutputStream) delegate).getChecksum().getValue());
final long length = buffer.getSize(DATA);
local.setSize(length);
local.setCompressedSize(length);
ZipOutputShop.this.updateProperties(local, buffer);
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
this.postamble = getIOPool().allocate();
Streams.copy( source.getPostambleInputStream(),
this.postamble.getOutputSocket().newOutputStream());
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
@CreatesObligation
@edu.umd.cs.findbugs.annotations.SuppressWarnings("OBL_UNSATISFIED_OBLIGATION")
protected OutputShop<ZipDriverEntry> newOutputShop(
FsModel model,
@WillCloseWhenClosed OutputStream out,
@CheckForNull @WillNotClose ZipInputShop source)
throws IOException {
return new MultiplexedOutputShop<ZipDriverEntry>(
new ZipOutputShop(this, model, out, source),
getPool());
}
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
@Override
@edu.umd.cs.findbugs.annotations.SuppressWarnings("OBL_UNSATISFIED_OBLIGATION")
protected OutputShop<ZipDriverEntry> newOutputShop(
final FsModel model,
final OutputStream out,
final ZipInputShop source)
throws IOException {
final ZipOutputShop shop = new ZipOutputShop(this, model, out, source);
final IOPool<?> pool = getPool();
return null != source && source.isAppendee()
? new MultiplexedOutputShop<ZipDriverEntry>(shop, pool)
: new OdfOutputShop(shop, pool);
}
}
内容来源于网络,如有侵权,请联系作者删除!