public abstract class SlideShowFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static interface |
SlideShowFactory.CreateSlideShow1<T> |
protected static interface |
SlideShowFactory.CreateSlideShow2<T,U> |
Modifier and Type | Field and Description |
---|---|
protected static SlideShowFactory.CreateSlideShow1<DirectoryNode> |
createHslfByNode |
protected static SlideShowFactory.CreateSlideShow1<POIFSFileSystem> |
createHslfByPoifs |
protected static SlideShowFactory.CreateSlideShow2<java.io.File,java.lang.Boolean> |
createXslfByFile |
protected static SlideShowFactory.CreateSlideShow1<java.io.InputStream> |
createXslfByStream |
Constructor and Description |
---|
SlideShowFactory() |
Modifier and Type | Method and Description |
---|---|
static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> |
create(DirectoryNode root)
Creates a SlideShow from the given DirectoryNode.
|
static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> |
create(DirectoryNode root,
java.lang.String password)
Creates a SlideShow from the given DirectoryNode, which may
be password protected
|
static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> |
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>> |
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 protected
|
static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> |
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 protected
|
static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> |
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>> |
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>> |
create(POIFSFileSystem fs)
Creates a SlideShow from the given POIFSFileSystem.
|
static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> |
create(POIFSFileSystem fs,
java.lang.String password)
Creates a SlideShow from the given POIFSFileSystem, which may
be password protected
|
protected static SlideShowFactory.CreateSlideShow1<java.io.InputStream> createXslfByStream
protected static SlideShowFactory.CreateSlideShow2<java.io.File,java.lang.Boolean> createXslfByFile
protected static SlideShowFactory.CreateSlideShow1<POIFSFileSystem> createHslfByPoifs
protected static SlideShowFactory.CreateSlideShow1<DirectoryNode> createHslfByNode
public static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(POIFSFileSystem fs) throws java.io.IOException
fs
- The POIFSFileSystem
to read the document fromjava.io.IOException
- if an error occurs while reading the datapublic 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
fs
- The POIFSFileSystem
to read the document frompassword
- The password that should be used or null if no password is necessary.java.io.IOException
- if an error occurs while reading the datapublic static <S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> SlideShow<S,P> create(DirectoryNode root) throws java.io.IOException
root
- The DirectoryNode
to start reading the document fromjava.io.IOException
- if an error occurs while reading the datapublic 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
root
- The DirectoryNode
to start reading the document frompassword
- The password that should be used or null if no password is necessary.java.io.IOException
- if an error occurs while reading the datapublic 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
Note that using an InputStream
has a higher memory footprint
than using a File
.
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.
inp
- The InputStream
to read data from.java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the SlideShow given is password protectedpublic 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
Note that using an InputStream
has a higher memory footprint
than using a File
.
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.
inp
- The InputStream
to read data from.password
- The password that should be used or null if no password is necessary.java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the wrong password is given for a protected filepublic 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
Note that in order to properly release resources the SlideShow should be closed after use.
file
- The file to read data from.java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the SlideShow given is password protectedpublic 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
Note that in order to properly release resources the SlideShow should be closed after use.
file
- The file to read data from.password
- The password that should be used or null if no password is necessary.java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the wrong password is given for a protected filepublic 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
Note that in order to properly release resources the SlideShow should be closed after use.
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.java.io.IOException
- if an error occurs while reading the dataEncryptedDocumentException
- If the wrong password is given for a protected fileCopyright 2020 The Apache Software Foundation or its licensors, as applicable.