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 booleanaccepts(FileMagic fm)XMLSlideShowcreate()Create a new empty SlideShowXMLSlideShowcreate(java.io.File file, java.lang.String password, boolean readOnly)Creates the XMLSlideShow from the given File, which must exist and be readable.XMLSlideShowcreate(java.io.InputStream stream)Creates a XMLSlideShow from the given InputStreamXMLSlideShowcreate(java.io.InputStream inp, java.lang.String password)XMLSlideShowcreate(DirectoryNode root, java.lang.String password)static XMLSlideShowcreateSlideShow(OPCPackage pkg)Creates a XMLSlideShow from the given OOXML Package
-
-
-
Method Detail
-
accepts
public boolean accepts(FileMagic fm)
- Specified by:
acceptsin interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>
-
create
public XMLSlideShow create()
Create a new empty SlideShow- Specified by:
createin interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>- Returns:
- The created SlideShow
-
create
public XMLSlideShow create(DirectoryNode root, java.lang.String password) throws java.io.IOException
- Specified by:
createin 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:
createin 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:
createin interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>- Parameters:
stream- TheInputStreamto 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- TheOPCPackageopened 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:
createin 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
-
-