Class SlideShowFactory
- java.lang.Object
-
- org.apache.poi.sl.usermodel.SlideShowFactory
-
- Direct Known Subclasses:
HSLFSlideShowFactory
,XSLFSlideShowFactory
public class SlideShowFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SlideShowFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(java.io.File file)
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given File, which must exist and be readable.static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(java.io.File file, java.lang.String password)
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given File, which must exist and be readable, and may be password protectedstatic <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(java.io.File file, java.lang.String password, boolean readOnly)
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given File, which must exist and be readable, and may be password protectedstatic <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(java.io.InputStream inp)
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given InputStream.static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(java.io.InputStream inp, java.lang.String password)
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given InputStream, which may be password protected.static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(DirectoryNode root)
Creates a SlideShow from the given NPOIFSFileSystem.static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(DirectoryNode root, java.lang.String password)
Creates a SlideShow from the given NPOIFSFileSystem, which may be password protectedstatic <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(POIFSFileSystem fs)
Creates a SlideShow from the given NPOIFSFileSystem.static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
SlideShow<S,P>create(POIFSFileSystem fs, java.lang.String password)
Creates a SlideShow from the given NPOIFSFileSystem, which may be password protected
-
-
-
Method Detail
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(POIFSFileSystem fs) throws java.io.IOException
Creates a SlideShow from the given NPOIFSFileSystem.- Parameters:
fs
- ThePOIFSFileSystem
to read the document from- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the data
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(POIFSFileSystem fs, java.lang.String password) throws java.io.IOException
Creates a SlideShow from the given NPOIFSFileSystem, which may be password protected- Parameters:
fs
- ThePOIFSFileSystem
to read the document frompassword
- The password that should be used or null if no password is necessary.- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the data
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(DirectoryNode root) throws java.io.IOException
Creates a SlideShow from the given NPOIFSFileSystem.- Parameters:
root
- TheDirectoryNode
to start reading the document from- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the data
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(DirectoryNode root, java.lang.String password) throws java.io.IOException
Creates a SlideShow from the given NPOIFSFileSystem, which may be password protected- Parameters:
root
- TheDirectoryNode
to start reading the document frompassword
- The password that should be used or null if no password is necessary.- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the data
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(java.io.InputStream inp) throws java.io.IOException, EncryptedDocumentException
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given InputStream.Note that using an
InputStream
has a higher memory footprint than using aFile
.Note that in order to properly release resources the SlideShow should be closed after use. Note also that loading from an InputStream requires more memory than loading from a File, so prefer
create(File)
where possible.- Parameters:
inp
- TheInputStream
to read data from.- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the SlideShow given is password protected
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(java.io.InputStream inp, java.lang.String password) throws java.io.IOException, EncryptedDocumentException
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given InputStream, which may be password protected.Note that using an
InputStream
has a higher memory footprint than using aFile
.Note that in order to properly release resources the SlideShow should be closed after use. Note also that loading from an InputStream requires more memory than loading from a File, so prefer
create(File)
where possible.- Parameters:
inp
- TheInputStream
to read data from.password
- The password that should be used or null if no password is necessary.- 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
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(java.io.File file) throws java.io.IOException, EncryptedDocumentException
Creates the appropriate HSLFSlideShow / 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.
- Parameters:
file
- The file to read data from.- Returns:
- The created SlideShow
- Throws:
java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the SlideShow given is password protected
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(java.io.File file, java.lang.String password) throws java.io.IOException, EncryptedDocumentException
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given File, which must exist and be readable, and may be password protectedNote that in order to properly release resources the SlideShow should be closed after use.
- Parameters:
file
- The file to read data from.password
- The password that should be used or null if no password is necessary.- 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
-
create
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(java.io.File file, java.lang.String password, boolean readOnly) throws java.io.IOException, EncryptedDocumentException
Creates the appropriate HSLFSlideShow / XMLSlideShow from the given File, which must exist and be readable, and may be password protectedNote that in order to properly release resources the SlideShow should be closed after use.
- Parameters:
file
- The file to read data from.password
- The password that should be used or null if no password is necessary.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
-
-