public class ZipPackagePart extends PackagePart
PackagePart
_container, _contentType, _partName
Constructor and Description |
---|
ZipPackagePart(OPCPackage container,
org.apache.commons.compress.archivers.zip.ZipArchiveEntry zipEntry,
PackagePartName partName,
java.lang.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 java.io.InputStream |
getInputStreamImpl()
Implementation of the getInputStream() which return the inputStream of
this part zip entry.
|
protected java.io.OutputStream |
getOutputStreamImpl()
Implementation of the getOutputStream().
|
long |
getSize() |
org.apache.commons.compress.archivers.zip.ZipArchiveEntry |
getZipArchive()
Get the zip entry 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.
|
addExternalRelationship, addExternalRelationship, addRelationship, addRelationship, addRelationship, addRelationship, clear, clearRelationships, compareTo, findExistingRelation, getContentType, getContentTypeDetails, getInputStream, getOutputStream, getPackage, getPartName, getRelatedPart, getRelationship, getRelationships, getRelationshipsByType, hasRelationships, isDeleted, isRelationshipExists, isRelationshipPart, removeRelationship, setContentType, setDeleted, toString
public ZipPackagePart(OPCPackage container, org.apache.commons.compress.archivers.zip.ZipArchiveEntry zipEntry, PackagePartName partName, java.lang.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 org.apache.commons.compress.archivers.zip.ZipArchiveEntry getZipArchive()
protected java.io.InputStream getInputStreamImpl() throws java.io.IOException
getInputStreamImpl
in class PackagePart
java.io.IOException
- Throws if an IO Exception occur in the implementation
method.protected java.io.OutputStream getOutputStreamImpl()
getOutputStreamImpl
in class PackagePart
public long getSize()
getSize
in class PackagePart
public boolean save(java.io.OutputStream os) throws OpenXML4JException
PackagePart
save
in class PackagePart
os
- Output stream to save this part.POILogger
OpenXML4JException
- If any exception occur.@NotImplemented public boolean load(java.io.InputStream ios)
PackagePart
load
in class PackagePart
ios
- The input stream of the content to load.POILogger
@NotImplemented public void close()
PackagePart
close
in class PackagePart
@NotImplemented public void flush()
PackagePart
flush
in class PackagePart
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.