public final class HSLFSlideShowImpl extends POIDocument implements java.io.Closeable
Constructor and Description |
---|
HSLFSlideShowImpl(DirectoryNode dir)
Constructs a Powerpoint document from a specific point in a POIFS Filesystem.
|
HSLFSlideShowImpl(java.io.InputStream inputStream)
Constructs a Powerpoint document from an input stream.
|
HSLFSlideShowImpl(POIFSFileSystem filesystem)
Constructs a Powerpoint document from a POIFS Filesystem.
|
HSLFSlideShowImpl(java.lang.String fileName)
Constructs a Powerpoint document from fileName.
|
Modifier and Type | Method and Description |
---|---|
int |
addPicture(HSLFPictureData img)
Add a new picture to this presentation.
(向此演示文稿添加新图片。)
|
int |
appendRootLevelRecord(Record newRecord)
Adds a new root level record, at the end, but before the last PersistPtrIncrementalBlock.
(在最后但在最后一个 PersistPtrIncrementalBlock 之前添加一个新的根级别记录。)
|
void |
close()
Closes the underlying
POIFSFileSystem from which the document was read, if any.
(关闭从中读取文档的基础 POIFSFileSystem(如果有)。)
|
static HSLFSlideShowImpl |
create()
Constructs a new, empty, Powerpoint document.
(构造一个新的空的 Powerpoint 文档。)
|
CurrentUserAtom |
getCurrentUserAtom()
Fetch the Current User Atom of the document
(获取文档的当前用户原子)
|
DocumentEncryptionAtom |
getDocumentEncryptionAtom() |
HSLFObjectData[] |
getEmbeddedObjects()
Gets embedded object data from the slide show.
(从幻灯片中获取嵌入的对象数据。)
|
protected java.lang.String |
getEncryptedPropertyStreamName() |
EncryptionInfo |
getEncryptionInfo() |
java.util.List<HSLFPictureData> |
getPictureData()
Return list of pictures contained in this presentation
(返回此演示文稿中包含的图片列表)
|
Record[] |
getRecords()
Returns an array of all the records found in the slideshow
(返回幻灯片中找到的所有记录的数组)
|
byte[] |
getUnderlyingBytes()
Returns an array of the bytes of the file.
(返回文件字节的数组。)
|
void |
normalizeRecords()
remove duplicated UserEditAtoms and merge PersistPtrHolder, i.e.
(删除重复的 UserEditAtoms 并合并 PersistPtrHolder,即)
|
void |
updateAndWriteDependantRecords(java.io.OutputStream os, java.util.Map<RecordTypes,PositionDependentRecord> interestingRecords)
This is a helper functions, which is needed for adding new position dependent records or finally write the slideshow to a file.
(这是一个辅助函数,用于添加新的位置相关记录或最终将幻灯片写入文件。)
|
void |
write()
Writes out the slideshow to the currently open file.
(将幻灯片写入当前打开的文件。)
|
void |
write(java.io.File newFile)
Writes out the slideshow file the is represented by an instance of this class.
(写出由此类的实例表示的幻灯片文件。)
|
void |
write(java.io.File newFile, boolean preserveNodes)
Writes out the slideshow file the is represented by an instance of this class.
(写出由此类的实例表示的幻灯片文件。)
|
void |
write(java.io.OutputStream out)
Writes out the slideshow file the is represented by an instance of this class.
(写出由此类的实例表示的幻灯片文件。)
|
void |
write(java.io.OutputStream out, boolean preserveNodes)
Writes out the slideshow file the is represented by an instance of this class.
(写出由此类的实例表示的幻灯片文件。)
|
clearDirectory, createInformationProperties, getDirectory, getDocumentSummaryInformation, getPropertySet, getPropertySet, getSummaryInformation, initDirectory, readProperties, replaceDirectory, validateInPlaceWritePossible, writeProperties, writeProperties, writeProperties
public HSLFSlideShowImpl(java.lang.String fileName) throws java.io.IOException
fileName
- The name of the file to read.
(fileName - 要读取的文件的名称。)
java.io.IOException
- if there is a problem while parsing the document.
(java.io.IOException - 如果在解析文档时出现问题。)
public HSLFSlideShowImpl(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the source of the data
(inputStream - 数据的来源)
java.io.IOException
- if there is a problem while parsing the document.
(java.io.IOException - 如果在解析文档时出现问题。)
public HSLFSlideShowImpl(POIFSFileSystem filesystem) throws java.io.IOException
filesystem
- the POIFS FileSystem to read from
(filesystem - 要读取的 POIFS 文件系统)
java.io.IOException
- if there is a problem while parsing the document.
(java.io.IOException - 如果在解析文档时出现问题。)
public HSLFSlideShowImpl(DirectoryNode dir) throws java.io.IOException
dir
- the POIFS directory to read from
(dir - 要读取的 POIFS 目录)
java.io.IOException
- if there is a problem while parsing the document.
(java.io.IOException - 如果在解析文档时出现问题。)
public static HSLFSlideShowImpl create()
public DocumentEncryptionAtom getDocumentEncryptionAtom()
public void normalizeRecords()
public void updateAndWriteDependantRecords(java.io.OutputStream os, java.util.Map<RecordTypes,PositionDependentRecord> interestingRecords) throws java.io.IOException
os
- the stream to write to, if null only the references are updated
(os - 要写入的流,如果为 null,则仅更新引用)
interestingRecords
- a map of interesting records (PersistPtrHolder and UserEditAtom) referenced by their RecordType. Only the very last of each type will be saved to the map. May be null, if not needed.
(interestingRecords - 由 RecordType 引用的有趣记录(PersistPtrHolder 和 UserEditAtom)的映射。只有每种类型的最后一个会保存到地图中。如果不需要,可以为空。)
java.io.IOException
(java.io.IOException)
public void write() throws java.io.IOException
This will fail (with an IllegalStateException
if the slideshow was opened read-only, opened from an InputStream
instead of a File, or if this is not the root document. For those cases, you must use write(OutputStream)
or write(File)
to write to a brand new document.
write
in class
POIDocument
(写在类 POIDocument)
java.io.IOException
- thrown on errors writing to the file
(java.io.IOException - 写入文件出错时抛出)
java.lang.IllegalStateException
- if this isn't from a writable File
(java.lang.IllegalStateException - 如果这不是来自可写文件)
public void write(java.io.File newFile) throws java.io.IOException
This will write out only the common OLE2 streams. If you require all streams to be written out, use write(File, boolean)
with preserveNodes
set to true
.
write
in class
POIDocument
(写在类 POIDocument)
newFile
- The File to write to.
(newFile - 要写入的文件。)
java.io.IOException
- If there is an unexpected IOException from writing to the File
(java.io.IOException - 如果写入文件时出现意外 IOException)
public void write(java.io.File newFile, boolean preserveNodes) throws java.io.IOException
preserveNodes
set to
true
(写出由此类的实例表示的幻灯片文件。如果您需要写出所有流(例如 Marcos、嵌入文档),则将 preserveNodes 设置为 true)
newFile
- The File to write to.
(newFile - 要写入的文件。)
preserveNodes
- Should all OLE2 streams be written back out, or only the common ones?
(preserveNodes - 应该写回所有 OLE2 流,还是只写常见的?)
java.io.IOException
- If there is an unexpected IOException from writing to the File
(java.io.IOException - 如果写入文件时出现意外 IOException)
public void write(java.io.OutputStream out) throws java.io.IOException
This will write out only the common OLE2 streams. If you require all streams to be written out, use write(OutputStream, boolean)
with preserveNodes
set to true
.
write
in class
POIDocument
(写在类 POIDocument)
out
- The OutputStream to write to.
(out - 要写入的 OutputStream。)
java.io.IOException
- If there is an unexpected IOException from the passed in OutputStream
(java.io.IOException - 如果传入的 OutputStream 出现意外的 IOException)
public void write(java.io.OutputStream out, boolean preserveNodes) throws java.io.IOException
preserveNodes
set to
true
(写出由此类的实例表示的幻灯片文件。如果您需要写出所有流(例如 Marcos、嵌入文档),则将 preserveNodes 设置为 true)
out
- The OutputStream to write to.
(out - 要写入的 OutputStream。)
preserveNodes
- Should all OLE2 streams be written back out, or only the common ones?
(preserveNodes - 应该写回所有 OLE2 流,还是只写常见的?)
java.io.IOException
- If there is an unexpected IOException from the passed in OutputStream
(java.io.IOException - 如果传入的 OutputStream 出现意外的 IOException)
public EncryptionInfo getEncryptionInfo()
getEncryptionInfo
in class
POIDocument
null
(如果文档已加密,则为加密信息,否则为 null)
public int appendRootLevelRecord(Record newRecord)
public int addPicture(HSLFPictureData img)
public Record[] getRecords()
public byte[] getUnderlyingBytes()
public CurrentUserAtom getCurrentUserAtom()
public java.util.List<HSLFPictureData> getPictureData()
public HSLFObjectData[] getEmbeddedObjects()
public void close() throws java.io.IOException
POIDocument
POIFSFileSystem
from which the document was read, if any. Has no effect on documents opened from an InputStream, or newly created ones.
Once close()
has been called, no further operations should be called on the document.
close
in interface
java.io.Closeable
(在接口 java.io.Closeable 中关闭)
close
in interface
java.lang.AutoCloseable
(在接口 java.lang.AutoCloseable 中关闭)
close
in class
POIDocument
java.io.IOException
(java.io.IOException)
protected java.lang.String getEncryptedPropertyStreamName()
getEncryptedPropertyStreamName
in class
POIDocument
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.