gpt4 book ai didi

org.apache.poi.openxml4j.opc.ZipPackagePart类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:01:27 27 4
gpt4 key购买 nike

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

ZipPackagePart介绍

[英]Zip implementation of a PackagePart.
[中]PackagePart的Zip实现。

代码示例

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

void register(final PackagePartCollection partList) throws InvalidFormatException {
  if (contentType == null) {
    throw new InvalidFormatException("The part " + partName.getURI().getPath() + " does not have any " +
        "content type ! Rule: Package require content types when retrieving a part from a package. [M.1.14]");
  }
  if (partList.containsKey(partName)) {
    throw new InvalidFormatException(
      "A part with the name '"+partName+"' already exist : Packages shall not contain equivalent part names " +
      "and package implementers shall neither create nor recognize packages with equivalent part names. [M1.12]");
  }
  try {
    partList.put(partName, new ZipPackagePart(ZipPackage.this, zipArchiveEntry, partName, contentType, false));
  } catch (InvalidOperationException e) {
    throw new InvalidFormatException(e.getMessage(), e);
  }
}

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

void register(final PackagePartCollection partList) throws InvalidFormatException {
  if (contentType == null) {
    throw new InvalidFormatException("The part " + partName.getURI().getPath() + " does not have any " +
        "content type ! Rule: Package require content types when retrieving a part from a package. [M.1.14]");
  }
  if (partList.containsKey(partName)) {
    throw new InvalidFormatException(
      "A part with the name '"+partName+"' already exist : Packages shall not contain equivalent part names " +
      "and package implementers shall neither create nor recognize packages with equivalent part names. [M1.12]");
  }
  try {
    partList.put(partName, new ZipPackagePart(ZipPackage.this, zipArchiveEntry, partName, contentType, false));
  } catch (InvalidOperationException e) {
    throw new InvalidFormatException(e.getMessage(), e);
  }
}

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

if (contentType != null && contentType.equals(ContentTypes.RELATIONSHIPS_PART)) {
  try {
    partList.put(partName, new ZipPackagePart(this, entry,
      partName, contentType));
  } catch (InvalidOperationException e) {
    partList.put(partName, new ZipPackagePart(this, entry,
        partName, contentType));
  } catch (InvalidOperationException e) {

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