public final class ZipPartMarshaller extends java.lang.Object implements PartMarshaller
Constructor and Description |
---|
ZipPartMarshaller() |
Modifier and Type | Method and Description |
---|---|
boolean |
marshall(PackagePart part, java.io.OutputStream os)
Save the specified part to the given stream.
(将指定的部分保存到给定的流中。)
|
static boolean |
marshallRelationshipPart(PackageRelationshipCollection rels, PackagePartName relPartName, org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zos)
Save relationships into the part.
(将关系保存到零件中。)
|
public boolean marshall(PackagePart part, java.io.OutputStream os) throws OpenXML4JException
marshall
in interface
PartMarshaller
(接口 PartMarshaller 中的编组)
part
- The
PackagePart
to save
(part - 要保存的 PackagePart)
os
- The stream to write the data to
(os - 将数据写入的流)
POILogger
is used to provide more information.
(如果保存成功或没有可保存的内容,则为 true,如果发生错误,则为 false。如果出现错误,通过 POILogger 进行日志记录用于提供更多信息。)
OpenXML4JException
- Throws if the stream cannot be written to or an internal exception is thrown.
(OpenXML4JException - 如果无法写入流或引发内部异常,则引发。)
public static boolean marshallRelationshipPart(PackageRelationshipCollection rels, PackagePartName relPartName, org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zos)
rels
- The relationships collection to marshall.
(rels - 要编组的关系集合。)
relPartName
- Part name of the relationship part to marshall.
(relPartName - 要编组的关系部分的部分名称。)
zos
- Zip output stream in which to save the XML content of the relationships serialization.
(zos - Zip 输出流,其中保存关系序列化的 XML 内容。)
POILogger
is used to provide more information.
(如果保存成功,则为 true,如果发生错误,则为 false。如果出现错误,通过 POILogger 进行日志记录用于提供更多信息。)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.