本文整理了Java中org.apache.poi.openxml4j.opc.ZipPackagePart
类的一些代码示例,展示了ZipPackagePart
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipPackagePart
类的具体详情如下:
包路径:org.apache.poi.openxml4j.opc.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) {
内容来源于网络,如有侵权,请联系作者删除!