public final class MemoryPackagePart extends PackagePart
| Constructor and Description |
|---|
MemoryPackagePart(OPCPackage pack,
PackagePartName partName,
String contentType)
Constructor.
|
MemoryPackagePart(OPCPackage pack,
PackagePartName partName,
String contentType,
boolean loadRelationships)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Allows sub-classes to clean up before new data is added.
|
void |
close()
Close this part : flush this part, close the input stream and output
stream.
|
void |
flush()
Flush the content of this part.
|
long |
getSize() |
boolean |
load(InputStream ios)
Load the content of this part.
|
boolean |
save(OutputStream os)
Save the content of this part and the associated relationships part (if
this part own at least one relationship) into the specified output
stream.
|
addExternalRelationship, addExternalRelationship, addRelationship, addRelationship, addRelationship, addRelationship, clearRelationships, compareTo, findExistingRelation, getContentType, getContentTypeDetails, getInputStream, getOutputStream, getPackage, getPartName, getRelatedPart, getRelationship, getRelationships, getRelationshipsByType, hasRelationships, isDeleted, isRelationshipExists, isRelationshipPart, removeRelationship, setContentType, setDeleted, toStringpublic MemoryPackagePart(OPCPackage pack, PackagePartName partName, String contentType) throws InvalidFormatException
pack - The owner package.partName - The part name.contentType - The content type.InvalidFormatException - If the specified URI is not OPC compliant.public MemoryPackagePart(OPCPackage pack, PackagePartName partName, String contentType, boolean loadRelationships) throws InvalidFormatException
pack - The owner package.partName - The part name.contentType - The content type.loadRelationships - Specify if the relationships will be loaded.InvalidFormatException - If the specified URI is not OPC compliant.public long getSize()
getSize in class PackagePartpublic void clear()
PackagePartclear in class PackagePartpublic boolean save(OutputStream os) throws OpenXML4JException
PackagePartsave in class PackagePartos - Output stream to save this part.OpenXML4JException - If any exception occur.public boolean load(InputStream ios) throws InvalidFormatException
PackagePartload in class PackagePartios - The input stream of the content to load.InvalidFormatException - Throws if the content format is invalid.public void close()
PackagePartclose in class PackagePartpublic void flush()
PackagePartflush in class PackagePartCopyright © 2010 - 2020 Adobe. All Rights Reserved