public final class SlideShowFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addProvider(SlideShowProvider<?,?> provider) |
static SlideShow<?,?> |
create(boolean XSLF)
Create a new empty SlideShow, either XSLF or HSLF depending on the parameter
(根据参数创建一个新的空幻灯片,XSLF 或 HSLF)
|
static SlideShow<?,?> |
create(DirectoryNode root)
Creates a SlideShow from the given DirectoryNode.
(从给定的 DirectoryNode 创建一个幻灯片。)
|
static SlideShow<?,?> |
create(DirectoryNode root, java.lang.String password)
Creates a SlideShow from the given DirectoryNode, which may be password protected
(从给定的 DirectoryNode 创建一个幻灯片,它可能受密码保护)
|
static SlideShow<?,?> |
create(java.io.File file)
Creates the appropriate HSLFSlideShow / XSLFSlideShow from the given File, which must exist and be readable.
(从给定的文件创建适当的 HSLFSlideShow / XSLFSlideShow,该文件必须存在且可读。)
|
static SlideShow<?,?> |
create(java.io.File file, java.lang.String password)
Creates the appropriate HSLFSlideShow / XSLFSlideShow from the given File, which must exist and be readable, and may be password protected
(从给定的文件创建适当的 HSLFSlideShow / XSLFSlideShow,该文件必须存在且可读,并且可能受密码保护)
|
static SlideShow<?,?> |
create(java.io.File file, java.lang.String password, boolean readOnly)
Creates the appropriate HSLFSlideShow / XSLFSlideShow from the given File, which must exist and be readable, and may be password protected
(从给定的文件创建适当的 HSLFSlideShow / XSLFSlideShow,该文件必须存在且可读,并且可能受密码保护)
|
static SlideShow<?,?> |
create(java.io.InputStream inp)
Creates the appropriate HSLFSlideShow / XSLFSlideShow from the given InputStream.
(从给定的 InputStream 创建适当的 HSLFSlideShow / XSLFSlideShow。)
|
static SlideShow<?,?> |
create(java.io.InputStream inp, java.lang.String password)
Creates the appropriate HSLFSlideShow / XSLFSlideShow from the given InputStream, which may be password protected.
(从给定的 InputStream 创建适当的 HSLFSlideShow / XSLFSlideShow,可能受密码保护。)
|
static SlideShow<?,?> |
create(POIFSFileSystem fs)
Creates a HSLFSlideShow from the given POIFSFileSystem
(从给定的 POIFSFileSystem 创建一个 HSLFSlideShow)
|
static void |
removeProvider(java.lang.Class<? extends SlideShowProvider<?,?>> provider) |
public static SlideShow<?,?> create(boolean XSLF) throws java.io.IOException
XSLF
- If an XSLFSlideShow or a HSLFSlideShow should be created
(XSLF - 如果应创建 XSLFSlideShow 或 HSLFSlideShow)
java.io.IOException
- if an error occurs while creating the objects
(java.io.IOException - 如果在创建对象时发生错误)
public static SlideShow<?,?> create(POIFSFileSystem fs) throws java.io.IOException
Note that in order to properly release resources the SlideShow should be closed after use.
(从给定的 POIFSFileSystem 创建 HSLFSlideShow 请注意,为了正确释放资源,在使用后应该关闭 SlideShow。)fs
- The
POIFSFileSystem
to read the document from
(fs - 要从中读取文档的 POIFSFileSystem)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
public static SlideShow<?,?> create(DirectoryNode root) throws java.io.IOException
root
- The
DirectoryNode
to start reading the document from
(root - 开始读取文档的 DirectoryNode)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
public static SlideShow<?,?> create(DirectoryNode root, java.lang.String password) throws java.io.IOException
root
- The
DirectoryNode
to start reading the document from
(root - 开始读取文档的 DirectoryNode)
password
- The password that should be used or null if no password is necessary.
(password - 应该使用的密码,如果不需要密码,则为 null。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
public static SlideShow<?,?> create(java.io.InputStream inp) throws java.io.IOException, EncryptedDocumentException
Your input stream MUST either support mark/reset, or be wrapped as a BufferedInputStream
! 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.
(inp - 要从中读取数据的 InputStream。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
EncryptedDocumentException
- If the SlideShow
given is password protected
(EncryptedDocumentException - 如果给定的幻灯片受密码保护)
public static SlideShow<?,?> create(java.io.InputStream inp, java.lang.String password) throws java.io.IOException, EncryptedDocumentException
Your input stream MUST either support mark/reset, or be wrapped as a BufferedInputStream
! 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.
(inp - 要从中读取数据的 InputStream。)
password
- The password that should be used or null if no password is necessary.
(password - 应该使用的密码,如果不需要密码,则为 null。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
EncryptedDocumentException
- If the wrong password is given for a protected file
(EncryptedDocumentException - 如果为受保护的文件提供了错误的密码)
public static SlideShow<?,?> 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.
(从给定的文件创建适当的 HSLFSlideShow / XSLFSlideShow,该文件必须存在且可读。请注意,为了正确释放资源,幻灯片应在使用后关闭。)file
- The file to read data from.
(file - 要从中读取数据的文件。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
EncryptedDocumentException
- If the SlideShow given is password protected
(EncryptedDocumentException - 如果给定的幻灯片受密码保护)
public static SlideShow<?,?> 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.
(从给定的文件创建适当的 HSLFSlideShow / XSLFSlideShow,这些文件必须存在且可读,并且可能受密码保护。请注意,为了正确释放资源,幻灯片在使用后应关闭。)file
- The file to read data from.
(file - 要从中读取数据的文件。)
password
- The password that should be used or null if no password is necessary.
(password - 应该使用的密码,如果不需要密码,则为 null。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
EncryptedDocumentException
- If the wrong password is given for a protected file
(EncryptedDocumentException - 如果为受保护的文件提供了错误的密码)
public static SlideShow<?,?> 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.
(从给定的文件创建适当的 HSLFSlideShow / XSLFSlideShow,这些文件必须存在且可读,并且可能受密码保护。请注意,为了正确释放资源,幻灯片在使用后应关闭。)file
- The file to read data from.
(file - 要从中读取数据的文件。)
password
- The password that should be used or null if no password is necessary.
(password - 应该使用的密码,如果不需要密码,则为 null。)
readOnly
- If the SlideShow should be opened in read-only mode to avoid writing back changes when the document is closed.
(readOnly - 如果幻灯片应该以只读模式打开以避免在文档关闭时写回更改。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
EncryptedDocumentException
- If the wrong password is given for a protected file
(EncryptedDocumentException - 如果为受保护的文件提供了错误的密码)
public static void addProvider(SlideShowProvider<?,?> provider)
public static void removeProvider(java.lang.Class<? extends SlideShowProvider<?,?>> provider)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.