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 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(File file, String password, boolean readOnly)Creates the XMLSlideShow from the given File, which must exist and be readable.XMLSlideShowcreate(InputStream stream)Creates a XMLSlideShow from the given InputStreamXMLSlideShowcreate(InputStream inp, String password)XMLSlideShowcreate(DirectoryNode root, 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, String password) throws IOException
- Specified by:
createin interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>- Throws:
IOException
-
create
public XMLSlideShow create(InputStream inp, String password) throws IOException
- Specified by:
createin interfaceSlideShowProvider<XSLFShape,XSLFTextParagraph>- Throws:
IOException
-
create
public XMLSlideShow create(InputStream stream) throws 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:
IOException- if an error occurs while reading the data
-
createSlideShow
public static XMLSlideShow createSlideShow(OPCPackage pkg) throws 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:
IOException- if an error occurs while reading the data
-
create
public XMLSlideShow create(File file, String password, boolean readOnly) throws 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:
IOException- if an error occurs while reading the dataEncryptedDocumentException- If the wrong password is given for a protected file
-
-