Package org.apache.poi.xslf.usermodel
Class XSLFSlideShowFactory
java.lang.Object
org.apache.poi.sl.usermodel.SlideShowFactory
org.apache.poi.xslf.usermodel.XSLFSlideShowFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XMLSlideShowcreate(OPCPackage pkg) Creates a XMLSlideShow from the given OOXML Package.static XMLSlideShowcreateSlideShow(File file, boolean readOnly) Creates the XMLSlideShow from the given File, which must exist and be readable.static XMLSlideShowcreateSlideShow(InputStream stream) Creates a XMLSlideShow from the given InputStreamstatic XMLSlideShowCreates a XMLSlideShow from the given OOXML Package
-
Constructor Details
-
XSLFSlideShowFactory
public XSLFSlideShowFactory()
-
-
Method Details
-
create
Creates a XMLSlideShow from the given OOXML Package. This is a convenience method to go along the create-methods of the super class.Note that in order to properly release resources the SlideShow should be closed after use.
- Parameters:
pkg- TheOPCPackageopened for reading data.- Returns:
- The created SlideShow
- Throws:
IOException- if an error occurs while reading the dataInvalidFormatException
-
createSlideShow
Creates a XMLSlideShow from the given OOXML PackageNote that in order to properly release resources the SlideShow should be closed after use.
- Parameters:
pkg- TheOPCPackageopened for reading data.- Returns:
- The created SlideShow
- Throws:
IOException- if an error occurs while reading the dataInvalidFormatException
-
createSlideShow
public static XMLSlideShow createSlideShow(File file, boolean readOnly) throws IOException, InvalidFormatException Creates the XMLSlideShow from the given File, which must exist and be readable.Note that in order to properly release resources theSlideShow should be closed after use.
- Parameters:
file- The file to read data from.readOnly- If the SlideShow should be opened in read-only mode to avoid writing back changes when the document is closed.- Returns:
- The created SlideShow
- Throws:
IOException- if an error occurs while reading the dataEncryptedDocumentException- If the wrong password is given for a protected fileInvalidFormatException
-
createSlideShow
public static XMLSlideShow createSlideShow(InputStream stream) throws IOException, InvalidFormatException Creates a XMLSlideShow from the given InputStreamNote that in order to properly release resources the SlideShow should be closed after use.
- Parameters:
stream- TheInputStreamto read data from.- Returns:
- The created SlideShow
- Throws:
IOException- if an error occurs while reading the dataInvalidFormatException
-