Package org.apache.poi.ooxml.util
Class PackageHelper
java.lang.Object
org.apache.poi.ooxml.util.PackageHelper
Provides handy methods to work with OOXML packages
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OPCPackageclone(OPCPackage pkg, File file) Deprecated.this method is not used internally and creates temp files that are not well handledstatic OPCPackageopen(InputStream is) static OPCPackageopen(InputStream stream, boolean closeStream)
-
Constructor Details
-
PackageHelper
public PackageHelper()
-
-
Method Details
-
open
- Throws:
IOException
-
open
- Parameters:
stream- The InputStream to read fromcloseStream- whether to close the stream (default is false)- Returns:
- OPCPackage
- Throws:
IOException- If reading data from the stream fails- Since:
- POI 5.2.0
-
clone
@Deprecated @Removal(version="6.0.0") public static OPCPackage clone(OPCPackage pkg, File file) throws OpenXML4JException, IOException Deprecated.this method is not used internally and creates temp files that are not well handledClone the specified package.- Parameters:
pkg- the package to clonefile- the destination file- Returns:
- the cloned package
- Throws:
OpenXML4JExceptionIOException
-