org.apache.commons.compress.archivers.zip.ZipUtil.checkRequestedFeatures()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(139)

本文整理了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

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

  1. private void copyFromZipInputStream(final InputStream src) throws IOException {
  2. if (entry == null) {
  3. throw new IllegalStateException("No current entry");
  4. }
  5. ZipUtil.checkRequestedFeatures(entry.entry);
  6. entry.hasWritten = true;
  7. int length;
  8. while ((length = src.read(copyBuffer)) >= 0 )
  9. {
  10. streamCompressor.writeCounted(copyBuffer, 0, length);
  11. count( length );
  12. }
  13. }

代码示例来源:origin: org.apache.commons/commons-compress

  1. /**
  2. * Writes bytes to ZIP entry.
  3. * @param b the byte array to write
  4. * @param offset the start position to write from
  5. * @param length the number of bytes to write
  6. * @throws IOException on error
  7. */
  8. @Override
  9. public void write(final byte[] b, final int offset, final int length) throws IOException {
  10. if (entry == null) {
  11. throw new IllegalStateException("No current entry");
  12. }
  13. ZipUtil.checkRequestedFeatures(entry.entry);
  14. final long writtenThisTime = streamCompressor.write(b, offset, length, entry.entry.getMethod());
  15. count(writtenThisTime);
  16. }

代码示例来源:origin: org.apache.commons/commons-compress

  1. ZipUtil.checkRequestedFeatures(ze);
  2. final long start = ze.getDataOffset();

代码示例来源:origin: org.apache.commons/commons-compress

  1. ZipUtil.checkRequestedFeatures(current.entry);
  2. if (!supportsDataDescriptorFor(current.entry)) {
  3. throw new UnsupportedZipFeatureException(UnsupportedZipFeatureException.Feature.DATA_DESCRIPTOR,

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  1. private void copyFromZipInputStream(final InputStream src) throws IOException {
  2. if (entry == null) {
  3. throw new IllegalStateException("No current entry");
  4. }
  5. ZipUtil.checkRequestedFeatures(entry.entry);
  6. entry.hasWritten = true;
  7. int length;
  8. while ((length = src.read(copyBuffer)) >= 0 )
  9. {
  10. streamCompressor.writeCounted(copyBuffer, 0, length);
  11. count( length );
  12. }
  13. }

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  1. /**
  2. * Writes bytes to ZIP entry.
  3. * @param b the byte array to write
  4. * @param offset the start position to write from
  5. * @param length the number of bytes to write
  6. * @throws IOException on error
  7. */
  8. @Override
  9. public void write(final byte[] b, final int offset, final int length) throws IOException {
  10. if (entry == null) {
  11. throw new IllegalStateException("No current entry");
  12. }
  13. ZipUtil.checkRequestedFeatures(entry.entry);
  14. final long writtenThisTime = streamCompressor.write(b, offset, length, entry.entry.getMethod());
  15. count(writtenThisTime);
  16. }

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  1. ZipUtil.checkRequestedFeatures(ze);
  2. final long start = ze.getDataOffset();

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  1. ZipUtil.checkRequestedFeatures(current.entry);
  2. if (!supportsDataDescriptorFor(current.entry)) {
  3. throw new UnsupportedZipFeatureException(UnsupportedZipFeatureException.Feature.DATA_DESCRIPTOR,

相关文章