public final class ZipPackage extends OPCPackage
contentTypeManager, defaultPackageAccess, defaultPartMarshaller, isDirty, originalPackagePath, output, packageProperties, partMarshallers, partUnmarshallers, relationships
Constructor and Description |
---|
ZipPackage()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeImpl()
Close and save the package.
(关闭并保存包。)
|
protected PackagePart |
createPartImpl(PackagePartName partName, java.lang.String contentType, boolean loadRelationships)
Create a new MemoryPackagePart from the specified URI and content type aram partName The part URI.
(从指定的 URI 和内容类型创建一个新的 MemoryPackagePart aram partName 部分 URI。)
|
protected void |
flushImpl()
Flush the package.
(冲洗包装。)
|
protected PackagePartCollection |
getPartsImpl()
Retrieves the parts from this package.
(从此包中检索部件。)
|
ZipEntrySource |
getZipArchive()
Get the zip archive
(获取 zip 存档)
|
boolean |
isClosed()
Has close been called already?
(close 已经被调用了吗?)
|
protected void |
removePartImpl(PackagePartName partName)
Delete a part from the package
(从包中删除零件)
|
protected void |
revertImpl()
Close the package without saving the document.
(关闭包而不保存文档。)
|
void |
saveImpl(java.io.OutputStream outputStream)
Save this package into the specified stream
(将此包保存到指定的流中)
|
addExternalRelationship, addExternalRelationship, addMarshaller, addPackagePart, addRelationship, addRelationship, addThumbnail, addThumbnail, addUnmarshaller, clearRelationships, close, containPart, create, create, create, createPart, createPart, deletePart, deletePartRecursive, ensureRelationships, flush, getPackageAccess, getPackageProperties, getPart, getPart, getParts, getPartsByContentType, getPartsByName, getPartsByRelationshipType, getRelationship, getRelationships, getRelationshipsByType, getUnusedPartIndex, hasRelationships, isRelationshipExists, open, open, open, open, open, open, openOrCreate, registerPartAndContentType, removeMarshaller, removePart, removePart, removePartRecursive, removeRelationship, removeUnmarshaller, replaceContentType, revert, save, save, unregisterPartAndContentType, validatePackage
public ZipPackage()
protected PackagePartCollection getPartsImpl() throws InvalidFormatException
getPartsImpl
in class
OPCPackage
(OPCPackage 类中的 getPartsImpl)
InvalidFormatException
- if the package is not valid.
(InvalidFormatException - 如果包无效。)
protected PackagePart createPartImpl(PackagePartName partName, java.lang.String contentType, boolean loadRelationships)
createPartImpl
in class
OPCPackage
(OPCPackage 类中的 createPartImpl)
contentType
- The part content type.
(contentType - 部分内容类型。)
partName
- URI of the part to create.
(partName - 要创建的部件的 URI。)
protected void removePartImpl(PackagePartName partName)
removePartImpl
in class
OPCPackage
(类 OPCPackage 中的 removePartImpl)
partName
- The URI of the part to delete.
(partName - 要删除的部分的 URI。)
java.lang.IllegalArgumentException
- Throws if the part URI is null or invalid.
(java.lang.IllegalArgumentException - 如果部分 URI 为空或无效则抛出。)
protected void flushImpl()
flushImpl
in class
OPCPackage
(OPCPackage 类中的 flushImpl)
protected void closeImpl() throws java.io.IOException
closeImpl
in class
OPCPackage
(类 OPCPackage 中的 closeImpl)
java.io.IOException
(java.io.IOException)
OPCPackage.close()
protected void revertImpl()
revertImpl
in class
OPCPackage
(OPCPackage 类中的 revertImpl)
public void saveImpl(java.io.OutputStream outputStream)
saveImpl
in class
OPCPackage
(类 OPCPackage 中的 saveImpl)
outputStream
- The stream use to save this package.
(outputStream - 用于保存此包的流。)
OPCPackage.save(OutputStream)
public ZipEntrySource getZipArchive()
public boolean isClosed()
OPCPackage
isClosed
in class
OPCPackage
(isClosed 在类 OPCPackage)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.