Package org.apache.poi.xslf.usermodel
Class XSLFSlideShowFactory
- java.lang.Object
-
- org.apache.poi.xslf.usermodel.XSLFSlideShowFactory
-
- All Implemented Interfaces:
SlideShowProvider<XSLFShape,XSLFTextParagraph>
@Internal public class XSLFSlideShowFactory extends java.lang.Object implements SlideShowProvider<XSLFShape,XSLFTextParagraph>
-
-
Constructor Summary
Constructors Constructor Description XSLFSlideShowFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(FileMagic fm)
XMLSlideShow
create()
Create a new empty SlideShowXMLSlideShow
create(java.io.File file, java.lang.String password, boolean readOnly)
Creates the XMLSlideShow from the given File, which must exist and be readable.XMLSlideShow
create(java.io.InputStream stream)
Creates a XMLSlideShow from the given InputStreamXMLSlideShow
create(java.io.InputStream inp, java.lang.String password)
XMLSlideShow
create(DirectoryNode root, java.lang.String password)
static XMLSlideShow
createSlideShow(OPCPackage pkg)
Creates a XMLSlideShow from the given OOXML Package
-
-
-
Method Detail
-
accepts
public boolean accepts(FileMagic fm)
- Specified by:
accepts
in interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
-
create
public XMLSlideShow create()
Create a new empty SlideShow- Specified by:
create
in interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
- Returns:
- The created SlideShow
-
create
public XMLSlideShow create(DirectoryNode root, java.lang.String password) throws java.io.IOException
- Specified by:
create
in interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
- Throws:
java.io.IOException
-
create
public XMLSlideShow create(java.io.InputStream inp, java.lang.String password) throws java.io.IOException
- Specified by:
create
in interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
- Throws:
java.io.IOException
-
create
public XMLSlideShow create(java.io.InputStream stream) throws java.io.IOException
Creates a XMLSlideShow from the given InputStreamNote that in order to properly release resources the SlideShow should be closed after use.
- Specified by:
create
in interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
- Parameters:
stream
- TheInputStream
to read data from.- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the data
-
createSlideShow
public static XMLSlideShow createSlideShow(OPCPackage pkg) throws java.io.IOException
Creates a XMLSlideShow from the given OOXML PackageNote that in order to properly release resources the SlideShow should be closed after use.
- Parameters:
pkg
- TheOPCPackage
opened for reading data.- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the data
-
create
public XMLSlideShow create(java.io.File file, java.lang.String password, boolean readOnly) throws java.io.IOException
Creates the XMLSlideShow from the given File, which must exist and be readable.Note that in order to properly release resources the SlideShow should be closed after use.
- Specified by:
create
in interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
- 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:
java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the wrong password is given for a protected file
-
-