gpt4 book ai didi

org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 19:35:31 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>()方法的一些代码示例,展示了ZipInputStreamZipEntrySource.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipInputStreamZipEntrySource.<init>()方法的具体详情如下:
包路径:org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource
类名称:ZipInputStreamZipEntrySource
方法名:<init>

ZipInputStreamZipEntrySource.<init>介绍

[英]Reads all the entries from the ZipInputStream into memory, and closes the source stream. We'll then eat lots of memory, but be able to work with the entries at-will.
[中]将ZipInputStream中的所有条目读取到内存中,并关闭源流。然后,我们将消耗大量内存,但能够随意处理条目。

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

private static ZipEntrySource openZipEntrySourceStream(ZipArchiveThresholdInputStream zis) throws InvalidOperationException {
  // Acquire the final level resource. If this is acquired successfully, the zip package was read successfully from the input stream
  try {
    // open the zip entry source stream
    return new ZipInputStreamZipEntrySource(zis);
  } catch (IOException e) {
    throw new InvalidOperationException("Could not open the specified zip entry source stream", e);
  }
}

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Constructor. Opens a Zip based Open XML document from
 *  an InputStream.
 *
 * @param in
 *            Zip input stream to load.
 * @param access
 *            The package access mode.
 * @throws IllegalArgumentException
 *             If the specified input stream not an instance of
 *             ZipInputStream.
 * @throws IOException
 *            if input stream cannot be opened, read, or closed
 */
ZipPackage(InputStream in, PackageAccess access) throws IOException {
  super(access);
  ZipArchiveThresholdInputStream zis = ZipHelper.openZipStream(in); // NOSONAR
  try {
    this.zipArchive = new ZipInputStreamZipEntrySource(zis);
  } catch (final IOException e) {
    IOUtils.closeQuietly(zis);
    throw e;
  }
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Constructor. <b>Operation not supported.</b>
 *
 * @param in
 *            Zip input stream to load.
 * @param access
 * @throws IllegalArgumentException
 *             If the specified input stream not an instance of
 *             ZipInputStream.
 */
ZipPackage(InputStream in, PackageAccess access) throws IOException {
  super(access);
  this.zipArchive = new ZipInputStreamZipEntrySource(
      new ZipInputStream(in)
  );
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

private static ZipEntrySource openZipEntrySourceStream(ZipArchiveThresholdInputStream zis) throws InvalidOperationException {
  // Acquire the final level resource. If this is acquired successfully, the zip package was read successfully from the input stream
  try {
    // open the zip entry source stream
    return new ZipInputStreamZipEntrySource(zis);
  } catch (IOException e) {
    throw new InvalidOperationException("Could not open the specified zip entry source stream", e);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Constructor. Opens a Zip based Open XML document from
 *  an InputStream.
 *
 * @param in
 *            Zip input stream to load.
 * @param access
 *            The package access mode.
 * @throws IllegalArgumentException
 *             If the specified input stream not an instance of
 *             ZipInputStream.
 * @throws IOException
 *            if input stream cannot be opened, read, or closed
 */
ZipPackage(InputStream in, PackageAccess access) throws IOException {
  super(access);
  ZipArchiveThresholdInputStream zis = ZipHelper.openZipStream(in); // NOSONAR
  try {
    this.zipArchive = new ZipInputStreamZipEntrySource(zis);
  } catch (final IOException e) {
    IOUtils.closeQuietly(zis);
    throw e;
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com