public final class ZipPackage extends Package
contentTypeManager, defaultPackageAccess, defaultPartMarshaller, isDirty, originalPackagePath, output, packageProperties, partList, 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,
String contentType,
boolean loadRelationships)
Create a new MemoryPackagePart from the specified URI and content type
aram partName The part URI.
|
protected void |
flushImpl()
Flush the package.
|
protected PackagePart |
getPartImpl(PackagePartName partName)
Implement the getPart() method to retrieve a part from its URI in the
current package
|
protected PackagePart[] |
getPartsImpl()
Retrieves the parts from this package.
|
ZipEntrySource |
getZipArchive()
Get the zip archive
|
protected void |
removePartImpl(PackagePartName partName)
Delete a part from the package
|
protected void |
revertImpl()
Close the package without saving the document.
|
void |
saveImpl(OutputStream outputStream)
Save this package into the specified stream
|
create, create, create, open, open, open, openOrCreateaddExternalRelationship, addExternalRelationship, addMarshaller, addPackagePart, addRelationship, addRelationship, addThumbnail, addUnmarshaller, clearRelationships, close, containPart, createPart, createPart, deletePart, deletePartRecursive, ensureRelationships, flush, getPackageAccess, getPackageProperties, getPart, getPart, getParts, getPartsByContentType, getPartsByName, getPartsByRelationshipType, getRelationship, getRelationships, getRelationshipsByType, hasRelationships, isRelationshipExists, open, open, removeMarshaller, removePart, removePart, removePartRecursive, removeRelationship, removeUnmarshaller, replaceContentType, revert, save, save, validatePackageprotected PackagePart[] getPartsImpl() throws InvalidFormatException
getPartsImpl in class OPCPackageInvalidFormatException - Throws if the package is not valid.protected PackagePart createPartImpl(PackagePartName partName, String contentType, boolean loadRelationships)
createPartImpl in class OPCPackagecontentType - The part content type.partName - URI of the part to create.protected void removePartImpl(PackagePartName partName)
removePartImpl in class OPCPackagepartName - The URI of the part to delete.IllegalArgumentException - Throws if the part URI is nulll or invalid.protected void flushImpl()
flushImpl in class OPCPackageprotected void closeImpl()
throws IOException
closeImpl in class OPCPackageIOExceptionOPCPackage.close()protected void revertImpl()
revertImpl in class OPCPackageprotected PackagePart getPartImpl(PackagePartName partName)
getPartImpl in class OPCPackagepartName - The URI of the part to retrieve.OPCPackage.getPart(PackageRelationship)public void saveImpl(OutputStream outputStream)
saveImpl in class OPCPackageoutputStream - The stream use to save this package.OPCPackage.save(OutputStream)public ZipEntrySource getZipArchive()
Copyright © 2020. All rights reserved.