本文整理了Java中org.apache.commons.compress.archivers.zip.ZipUtil.checkRequestedFeatures()
方法的一些代码示例,展示了ZipUtil.checkRequestedFeatures()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipUtil.checkRequestedFeatures()
方法的具体详情如下:
包路径:org.apache.commons.compress.archivers.zip.ZipUtil
类名称:ZipUtil
方法名:checkRequestedFeatures
[英]Checks whether the entry requires features not (yet) supported by the library and throws an exception if it does.
[中]检查条目是否需要库(尚未)支持的功能,如果需要,则抛出异常。
代码示例来源:origin: org.apache.commons/commons-compress
private void copyFromZipInputStream(final InputStream src) throws IOException {
if (entry == null) {
throw new IllegalStateException("No current entry");
}
ZipUtil.checkRequestedFeatures(entry.entry);
entry.hasWritten = true;
int length;
while ((length = src.read(copyBuffer)) >= 0 )
{
streamCompressor.writeCounted(copyBuffer, 0, length);
count( length );
}
}
代码示例来源:origin: org.apache.commons/commons-compress
/**
* Writes bytes to ZIP entry.
* @param b the byte array to write
* @param offset the start position to write from
* @param length the number of bytes to write
* @throws IOException on error
*/
@Override
public void write(final byte[] b, final int offset, final int length) throws IOException {
if (entry == null) {
throw new IllegalStateException("No current entry");
}
ZipUtil.checkRequestedFeatures(entry.entry);
final long writtenThisTime = streamCompressor.write(b, offset, length, entry.entry.getMethod());
count(writtenThisTime);
}
代码示例来源:origin: org.apache.commons/commons-compress
ZipUtil.checkRequestedFeatures(ze);
final long start = ze.getDataOffset();
代码示例来源:origin: org.apache.commons/commons-compress
ZipUtil.checkRequestedFeatures(current.entry);
if (!supportsDataDescriptorFor(current.entry)) {
throw new UnsupportedZipFeatureException(UnsupportedZipFeatureException.Feature.DATA_DESCRIPTOR,
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
private void copyFromZipInputStream(final InputStream src) throws IOException {
if (entry == null) {
throw new IllegalStateException("No current entry");
}
ZipUtil.checkRequestedFeatures(entry.entry);
entry.hasWritten = true;
int length;
while ((length = src.read(copyBuffer)) >= 0 )
{
streamCompressor.writeCounted(copyBuffer, 0, length);
count( length );
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Writes bytes to ZIP entry.
* @param b the byte array to write
* @param offset the start position to write from
* @param length the number of bytes to write
* @throws IOException on error
*/
@Override
public void write(final byte[] b, final int offset, final int length) throws IOException {
if (entry == null) {
throw new IllegalStateException("No current entry");
}
ZipUtil.checkRequestedFeatures(entry.entry);
final long writtenThisTime = streamCompressor.write(b, offset, length, entry.entry.getMethod());
count(writtenThisTime);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
ZipUtil.checkRequestedFeatures(ze);
final long start = ze.getDataOffset();
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
ZipUtil.checkRequestedFeatures(current.entry);
if (!supportsDataDescriptorFor(current.entry)) {
throw new UnsupportedZipFeatureException(UnsupportedZipFeatureException.Feature.DATA_DESCRIPTOR,
内容来源于网络,如有侵权,请联系作者删除!