public class POIXMLProperties
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
POIXMLProperties.CoreProperties
The core document properties
(核心文档属性)
|
static class |
POIXMLProperties.CustomProperties
Custom document properties
(自定义文档属性)
|
static class |
POIXMLProperties.ExtendedProperties
Extended document properties
(扩展文档属性)
|
Constructor and Description |
---|
POIXMLProperties(OPCPackage docPackage) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit changes to the underlying OPC package
(提交对底层 OPC 包的更改)
|
POIXMLProperties.CoreProperties |
getCoreProperties()
Returns the core document properties
(返回核心文档属性)
|
POIXMLProperties.CustomProperties |
getCustomProperties()
Returns the custom document properties
(返回自定义文档属性)
|
POIXMLProperties.ExtendedProperties |
getExtendedProperties()
Returns the extended document properties
(返回扩展文档属性)
|
java.lang.String |
getThumbnailFilename()
Returns the name of the Document thumbnail, eg
thumbnail.jpeg , or
null if there isn't one.
(返回文档缩略图的名称,例如 thumbnail.jpeg,如果没有则返回 null。)
|
java.io.InputStream |
getThumbnailImage()
Returns the Document thumbnail image data, or
null if there isn't one.
(返回文档缩略图图像数据,如果没有则返回 null。)
|
protected PackagePart |
getThumbnailPart()
Returns the
PackagePart for the Document Thumbnail, or
null if there isn't one
(返回文档缩略图的 PackagePart,如果没有则返回 null)
|
void |
setThumbnail(java.lang.String filename, java.io.InputStream imageData)
Sets the Thumbnail for the document, replacing any existing one.
(设置文档的缩略图,替换任何现有的。)
|
public POIXMLProperties(OPCPackage docPackage) throws java.io.IOException, OpenXML4JException, org.apache.xmlbeans.XmlException
java.io.IOException
(java.io.IOException)
OpenXML4JException
(OpenXML4JException)
org.apache.xmlbeans.XmlException
(org.apache.xmlbeans.XmlException)
public POIXMLProperties.CoreProperties getCoreProperties()
public POIXMLProperties.ExtendedProperties getExtendedProperties()
public POIXMLProperties.CustomProperties getCustomProperties()
protected PackagePart getThumbnailPart()
PackagePart
for the Document Thumbnail, or
null
if there isn't one
(返回文档缩略图的 PackagePart,如果没有则返回 null)
public java.lang.String getThumbnailFilename()
thumbnail.jpeg
, or
null
if there isn't one.
(返回文档缩略图的名称,例如 thumbnail.jpeg,如果没有则返回 null。)
public java.io.InputStream getThumbnailImage() throws java.io.IOException
null
if there isn't one.
(返回文档缩略图图像数据,如果没有则返回 null。)
java.io.IOException
- if the thumbnail can't be read
(java.io.IOException - 如果无法读取缩略图)
public void setThumbnail(java.lang.String filename, java.io.InputStream imageData) throws java.io.IOException
filename
- The filename for the thumbnail image, eg
thumbnail.jpg
(filename - 缩略图的文件名,例如 thumbnail.jpg)
imageData
- The inputstream to read the thumbnail image from
(imageData - 从中读取缩略图的输入流)
java.io.IOException
- if the thumbnail can't be written
(java.io.IOException - 如果无法写入缩略图)
public void commit() throws java.io.IOException
java.io.IOException
- if the properties can't be saved
(java.io.IOException - 如果无法保存属性)
POIXMLException
- if the properties are erroneous
(POIXMLException - 如果属性错误)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.