org.apache.poi.openxml4j.opc.ZipPackagePart.<init>()方法的使用及代码示例

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

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

ZipPackagePart.<init>介绍

[英]Constructor.
[中]建造师。

代码示例

代码示例来源: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) {

相关文章

ZipPackagePart类方法