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,
String contentType,
boolean loadRelationships)
Create a new MemoryPackagePart from the specified URI and content type
|
static boolean |
encryptTempFilePackageParts() |
protected void |
flushImpl()
Flush the package.
|
protected PackagePartCollection |
getPartsImpl()
Retrieves the parts from this package.
|
ZipEntrySource |
getZipArchive()
Get the zip archive
|
boolean |
isClosed()
Has close been called already?
|
protected void |
revertImpl()
Close the package without saving the document.
|
void |
saveImpl(OutputStream outputStream)
Save this package into the specified stream
|
static void |
setEncryptTempFilePackageParts(boolean encryptTempFiles) |
static void |
setUseTempFilePackageParts(boolean tempFilePackageParts) |
static boolean |
useTempFilePackageParts() |
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, hasPackagePart, hasRelationships, isRelationshipExists, isStrictOoxmlFormat, open, open, open, open, open, open, open, openOrCreate, registerPartAndContentType, removeMarshaller, removePart, removePart, removePartImpl, removePartRecursive, removeRelationship, removeUnmarshaller, replaceContentType, revert, save, save, toString, unregisterPartAndContentType, validatePackagepublic static void setUseTempFilePackageParts(boolean tempFilePackageParts)
tempFilePackageParts - whether to save package part data in temp files to save memorypublic static void setEncryptTempFilePackageParts(boolean encryptTempFiles)
encryptTempFiles - whether to encrypt package part temp filespublic static boolean useTempFilePackageParts()
public static boolean encryptTempFilePackageParts()
protected PackagePartCollection getPartsImpl() throws InvalidFormatException
getPartsImpl in class OPCPackageInvalidFormatException - if the package is not valid.protected PackagePart createPartImpl(PackagePartName partName, String contentType, boolean loadRelationships)
createPartImpl in class OPCPackagepartName - The part name.contentType - The part content type.loadRelationships - whether to load relationships.IllegalArgumentException - if partName or contentType is nullprotected void flushImpl()
flushImpl in class OPCPackageprotected void closeImpl()
throws IOException
closeImpl in class OPCPackageIOExceptionOPCPackage.close()protected void revertImpl()
revertImpl in class OPCPackagepublic void saveImpl(OutputStream outputStream)
saveImpl in class OPCPackageoutputStream - The stream use to save this package.OPCPackage.save(OutputStream)public ZipEntrySource getZipArchive()
public boolean isClosed()
OPCPackageisClosed in class OPCPackage