@Internal public class XSLFSlideShowFactory extends java.lang.Object implements SlideShowProvider<XSLFShape,XSLFTextParagraph>
Constructor and Description |
---|
XSLFSlideShowFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(FileMagic fm) |
XMLSlideShow |
create()
Create a new empty SlideShow
(创建一个新的空幻灯片)
|
XMLSlideShow |
create(DirectoryNode root, java.lang.String password) |
XMLSlideShow |
create(java.io.File file, java.lang.String password, boolean readOnly)
Creates the XMLSlideShow from the given File, which must exist and be readable.
(从给定的文件创建 XMLSlideShow,该文件必须存在且可读。)
|
XMLSlideShow |
create(java.io.InputStream stream)
Creates a XMLSlideShow from the given InputStream
(从给定的 InputStream 创建一个 XMLSlideShow)
|
XMLSlideShow |
create(java.io.InputStream inp, java.lang.String password) |
static XMLSlideShow |
createSlideShow(OPCPackage pkg)
Creates a XMLSlideShow from the given OOXML Package
(从给定的 OOXML 包创建 XMLSlideShow)
|
public boolean accepts(FileMagic fm)
accepts
in interface
SlideShowProvider<XSLFShape,XSLFTextParagraph>
(在接口 SlideShowProvider 中接受
public XMLSlideShow create()
create
in interface
SlideShowProvider<XSLFShape,XSLFTextParagraph>
(在界面 SlideShowProvider 中创建
public XMLSlideShow create(DirectoryNode root, java.lang.String password) throws java.io.IOException
create
in interface
SlideShowProvider<XSLFShape,XSLFTextParagraph>
(在界面 SlideShowProvider 中创建
java.io.IOException
(java.io.IOException)
public XMLSlideShow create(java.io.InputStream inp, java.lang.String password) throws java.io.IOException
create
in interface
SlideShowProvider<XSLFShape,XSLFTextParagraph>
(在界面 SlideShowProvider 中创建
java.io.IOException
(java.io.IOException)
public XMLSlideShow create(java.io.InputStream stream) throws java.io.IOException
Note that in order to properly release resources the SlideShow should be closed after use.
(从给定的 InputStream 创建一个 XMLSlideShow 请注意,为了正确释放资源,SlideShow 应该在使用后关闭。)create
in interface
SlideShowProvider<XSLFShape,XSLFTextParagraph>
(在界面 SlideShowProvider 中创建
stream
- The
InputStream
to read data from.
(stream - 要从中读取数据的 InputStream。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
public static XMLSlideShow createSlideShow(OPCPackage pkg) throws java.io.IOException
Note that in order to properly release resources the SlideShow should be closed after use.
(从给定的 OOXML 包创建 XMLSlideShow 请注意,为了正确释放资源,幻灯片在使用后应关闭。)pkg
- The
OPCPackage
opened for reading data.
(pkg - 为读取数据而打开的 OPCPackage。)
java.io.IOException
- if an error occurs while reading the data
(java.io.IOException - 如果读取数据时发生错误)
public XMLSlideShow create(java.io.File file, java.lang.String password, boolean readOnly) throws java.io.IOException
Note that in order to properly release resources the SlideShow should be closed after use.
(从给定的文件创建 XMLSlideShow,该文件必须存在且可读。请注意,为了正确释放资源,幻灯片应在使用后关闭。)create
in interface
SlideShowProvider<XSLFShape,XSLFTextParagraph>
(在界面 SlideShowProvider 中创建
file
- The file to read data from.
(file - 要从中读取数据的文件。)
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 - 如果为受保护的文件提供了错误的密码)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.