|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.openxml4j.opc.PackagePart
org.apache.poi.openxml4j.opc.internal.MemoryPackagePart
public final class MemoryPackagePart
Memory version of a package part. Use to
Constructor Summary | |
---|---|
MemoryPackagePart(OPCPackage pack,
PackagePartName partName,
java.lang.String contentType)
Constructor. |
|
MemoryPackagePart(OPCPackage pack,
PackagePartName partName,
java.lang.String contentType,
boolean loadRelationships)
Constructor. |
Method Summary | |
---|---|
void |
clear()
|
void |
close()
Close this part : flush this part, close the input stream and output stream. |
void |
flush()
Flush the content of this part. |
boolean |
load(java.io.InputStream ios)
Load the content of this part. |
boolean |
save(java.io.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. |
Methods inherited from class org.apache.poi.openxml4j.opc.PackagePart |
---|
addExternalRelationship, addExternalRelationship, addRelationship, addRelationship, addRelationship, addRelationship, clearRelationships, getContentType, getInputStream, getOutputStream, getPackage, getPartName, getRelationship, getRelationships, getRelationshipsByType, hasRelationships, isDeleted, isRelationshipExists, isRelationshipPart, removeRelationship, setContentType, setDeleted, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryPackagePart(OPCPackage pack, PackagePartName partName, java.lang.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, java.lang.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.Method Detail |
---|
public void clear()
public boolean save(java.io.OutputStream os) throws OpenXML4JException
PackagePart
save
in class PackagePart
os
- Output stream to save this part.
OpenXML4JException
- If any exception occur.public boolean load(java.io.InputStream ios) throws InvalidFormatException
PackagePart
load
in class PackagePart
ios
- The input stream of the content to load.
InvalidFormatException
- Throws if the content format is invalid.public void close()
PackagePart
close
in class PackagePart
public void flush()
PackagePart
flush
in class PackagePart
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |