public class ZipPackagePart extends PackagePart
PackagePart_container, _contentType, _partName| Constructor and Description |
|---|
ZipPackagePart(OPCPackage container,
PackagePartName partName,
String contentType)
Constructor.
|
ZipPackagePart(OPCPackage container,
ZipEntry zipEntry,
PackagePartName partName,
String contentType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this part : flush this part, close the input stream and output
stream.
|
void |
flush()
Flush the content of this part.
|
protected InputStream |
getInputStreamImpl()
Implementation of the getInputStream() which return the inputStream of
this part zip entry.
|
protected OutputStream |
getOutputStreamImpl()
Implementation of the getOutputStream().
|
ZipEntry |
getZipArchive()
Get the zip entry of this part.
|
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, getContentType, getInputStream, getOutputStream, getPackage, getPartName, getRelatedPart, getRelationship, getRelationships, getRelationshipsByType, hasRelationships, isDeleted, isRelationshipExists, isRelationshipPart, removeRelationship, setContentType, setDeleted, toStringpublic ZipPackagePart(OPCPackage container, PackagePartName partName, String contentType) throws InvalidFormatException
container - The container package.partName - Part name.contentType - Content type.InvalidFormatException - Throws if the content of this part invalid.public ZipPackagePart(OPCPackage container, ZipEntry zipEntry, PackagePartName partName, String contentType) throws InvalidFormatException
container - The container package.zipEntry - The zip entry corresponding to this part.partName - The part name.contentType - Content type.InvalidFormatException - Throws if the content of this part is invalid.public ZipEntry getZipArchive()
protected InputStream getInputStreamImpl() throws IOException
getInputStreamImpl in class PackagePartIOException - Throws if an IO Exception occur in the implementation
method.protected OutputStream getOutputStreamImpl()
getOutputStreamImpl 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)
PackagePartload in class PackagePartios - The input stream of the content to load.public void close()
PackagePartclose in class PackagePartpublic void flush()
PackagePartflush in class PackagePartCopyright © 2020. All rights reserved.