public class DocumentSummaryInformation extends PropertySet
SummaryInformation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_STREAM_NAME
The document name a document summary information stream usually has in a POIFS filesystem.
(文档摘要信息流通常在 POIFS 文件系统中具有的文档名称。)
|
static ClassID[] |
FORMAT_ID
The DocumentSummaryInformation's first and second sections' format ID.
(DocumentSummaryInformation 的第一和第二部分的格式 ID。)
|
OS_MACINTOSH, OS_WIN16, OS_WIN32
Constructor and Description |
---|
DocumentSummaryInformation()
Creates an empty
DocumentSummaryInformation .
|
DocumentSummaryInformation(java.io.InputStream stream)
Creates a
DocumentSummaryInformation instance from an
InputStream in the Horrible Property Set Format.
|
DocumentSummaryInformation(PropertySet ps)
Creates a
DocumentSummaryInformation from a given
PropertySet .
|
Modifier and Type | Method and Description |
---|---|
int |
getApplicationVersion()
Gets the version of the Application which wrote the Property set, stored with the two high order bytes having the major version number, and the two low order bytes the minor version number.
(获取写入属性集的应用程序的版本,存储有两个高位字节具有主版本号,两个低位字节是次要版本号。)
|
int |
getByteCount()
Returns the byte count or 0 if the
DocumentSummaryInformation does not contain a byte count.
(如果 DocumentSummaryInformation 不包含字节计数,则返回字节计数或 0。)
|
java.lang.String |
getCategory()
Returns the category (or
null ).
(返回类别(或 null)。)
|
int |
getCharCountWithSpaces()
Returns the character count including whitespace, or 0 if the
DocumentSummaryInformation does not contain this char count.
(返回包含空格的字符数,如果 DocumentSummaryInformation 不包含此字符数,则返回 0。)
|
java.lang.String |
getCompany()
Returns the company (or
null ).
(返回公司(或 null)。)
|
java.lang.String |
getContentStatus()
Gets the content status of the file (or
null ).
(获取文件的内容状态(或 null)。)
|
java.lang.String |
getContentType()
Gets the content type of the file (or
null ).
(获取文件的内容类型(或 null)。)
|
CustomProperties |
getCustomProperties()
Gets the custom properties.
(获取自定义属性。)
|
byte[] |
getDocparts()
Returns the doc parts (or
null )
when this method is implemented.
(实现此方法时返回文档部分(或 null)。)
|
java.lang.String |
getDocumentVersion()
Gets the document version as a string, which is normally unset and empty (or
null ).
(以字符串形式获取文档版本,通常未设置且为空(或 null)。)
|
byte[] |
getHeadingPair()
Returns the heading pair (or
null )
when this method is implemented.
(实现此方法时返回标题对(或 null)。)
|
int |
getHiddenCount()
Returns the hidden count or 0 if the
DocumentSummaryInformation does not contain a hidden count.
(如果 DocumentSummaryInformation 不包含隐藏计数,则返回隐藏计数或 0。)
|
boolean |
getHyperlinksChanged()
Get if the User Defined Property Set has been updated outside of the Application.
(获取用户定义的属性集是否已在应用程序之外更新。)
|
java.lang.String |
getLanguage()
Gets the document language, which is normally unset and empty (or
null ).
(获取文档语言,通常未设置且为空(或 null)。)
|
int |
getLineCount()
Returns the line count or 0 if the
DocumentSummaryInformation does not contain a line count.
(如果 DocumentSummaryInformation 不包含行数,则返回行数或 0。)
|
boolean |
getLinksDirty()
Returns
true if the custom links are dirty.
(如果自定义链接脏,则返回 true。)
|
java.lang.String |
getManager()
Returns the manager (or
null ).
(返回经理(或 null)。)
|
int |
getMMClipCount()
Returns the mmclip count or 0 if the
DocumentSummaryInformation does not contain a mmclip count.
(如果 DocumentSummaryInformation 不包含 mmclip 计数,则返回 mmclip 计数或 0。)
|
int |
getNoteCount()
Returns the note count or 0 if the
DocumentSummaryInformation does not contain a note count.
(如果 DocumentSummaryInformation 不包含注释计数,则返回注释计数或 0。)
|
int |
getParCount()
Returns the par count or 0 if the
DocumentSummaryInformation does not contain a par count.
(如果 DocumentSummaryInformation 不包含标准计数,则返回标准计数或 0。)
|
java.lang.String |
getPresentationFormat()
Returns the presentation format (or
null ).
(返回演示格式(或 null)。)
|
PropertyIDMap |
getPropertySetIDMap()
The id to name mapping of the properties in this set.
(此集中属性的 id 到名称映射。)
|
boolean |
getScale()
Returns
true when scaling of the thumbnail is desired,
false if cropping is desired.
(需要缩放缩略图时返回 true,如果需要裁剪则返回 false。)
|
int |
getSlideCount()
Returns the slide count or 0 if the
DocumentSummaryInformation does not contain a slide count.
(如果 DocumentSummaryInformation 不包含幻灯片计数,则返回幻灯片计数或 0。)
|
byte[] |
getVBADigitalSignature()
Returns the VBA digital signature for the VBA project embedded in the document (or
null ).
(返回嵌入在文档中的 VBA 项目的 VBA 数字签名(或 null)。)
|
void |
removeApplicationVersion()
Removes the Application Version
(删除应用程序版本)
|
void |
removeByteCount()
Removes the byte count.
(删除字节数。)
|
void |
removeCategory()
Removes the category.
(删除类别。)
|
void |
removeCharCountWithSpaces()
Removes the character count
(删除字符数)
|
void |
removeCompany()
Removes the company.
(删除公司。)
|
void |
removeContentStatus()
Removes the content status of the file
(删除文件的内容状态)
|
void |
removeContentType()
Removes the content type of the file
(删除文件的内容类型)
|
void |
removeCustomProperties()
Removes the custom properties.
(删除自定义属性。)
|
void |
removeDocparts()
Removes the doc parts.
(删除文档部分。)
|
void |
removeDocumentVersion()
Removes the document version string
(删除文档版本字符串)
|
void |
removeHeadingPair()
Removes the heading pair.
(删除航向对。)
|
void |
removeHiddenCount()
Removes the hidden count.
(删除隐藏计数。)
|
void |
removeHyperlinksChanged()
Removes the flag for if the User Defined Property Set has been updated outside of the Application.
(如果用户定义的属性集已在应用程序之外更新,则删除该标志。)
|
void |
removeLanguage()
Removes the document language
(删除文档语言)
|
void |
removeLineCount()
Removes the line count.
(删除行数。)
|
void |
removeLinksDirty()
Removes the links dirty.
(删除脏链接。)
|
void |
removeManager()
Removes the manager.
(删除管理器。)
|
void |
removeMMClipCount()
Removes the mmclip count.
(删除 mmclip 计数。)
|
void |
removeNoteCount()
Removes the noteCount.
(删除 noteCount。)
|
void |
removeParCount()
Removes the par count.
(删除面值。)
|
void |
removePresentationFormat()
Removes the presentation format.
(删除演示文稿格式。)
|
void |
removeScale()
Removes the scale.
(移除刻度。)
|
void |
removeSlideCount()
Removes the slide count.
(删除幻灯片计数。)
|
void |
removeVBADigitalSignature()
Removes the VBA Digital Signature
(删除 VBA 数字签名)
|
void |
setApplicationVersion(int version)
Sets the Application version, which must be a 4 byte int with the two high order bytes having the major version number, and the two low order bytes the minor version number.
(设置应用程序版本,它必须是一个 4 字节的 int,其中两个高位字节具有主版本号,两个低位字节是次要版本号。)
|
void |
setByteCount(int byteCount)
Sets the byte count.
(设置字节数。)
|
void |
setCategory(java.lang.String category)
Sets the category.
(设置类别。)
|
void |
setCharCountWithSpaces(int count)
Sets the character count including whitespace
(设置字符数,包括空格)
|
void |
setCompany(java.lang.String company)
Sets the company.
(设置公司。)
|
void |
setContentStatus(java.lang.String status)
Sets the content status of the file
(设置文件的内容状态)
|
void |
setContentType(java.lang.String type)
Sets the content type of the file
(设置文件的内容类型)
|
void |
setCustomProperties(CustomProperties customProperties)
Sets the custom properties.
(设置自定义属性。)
|
void |
setDocparts(byte[] docparts)
Sets the doc parts.
(设置文档部分。)
|
void |
setDocumentVersion(java.lang.String version)
Sets the document version string
(设置文档版本字符串)
|
void |
setHeadingPair(byte[] headingPair)
Sets the heading pair.
(设置航向对。)
|
void |
setHiddenCount(int hiddenCount)
Sets the hidden count.
(设置隐藏计数。)
|
void |
setHyperlinksChanged(boolean changed)
Set the flag for if the User Defined Property Set has been updated outside of the Application.
(如果用户定义的属性集已在应用程序之外更新,则设置该标志。)
|
void |
setLanguage(java.lang.String language)
Set the document language
(设置文档语言)
|
void |
setLineCount(int lineCount)
Sets the line count.
(设置行数。)
|
void |
setLinksDirty(boolean linksDirty)
Sets the linksDirty.
(设置链接脏。)
|
void |
setManager(java.lang.String manager)
Sets the manager.
(设置管理器。)
|
void |
setMMClipCount(int mmClipCount)
Sets the mmclip count.
(设置 mmclip 计数。)
|
void |
setNoteCount(int noteCount)
Sets the note count.
(设置音符计数。)
|
void |
setParCount(int parCount)
Sets the par count.
(设置面值。)
|
void |
setPresentationFormat(java.lang.String presentationFormat)
Sets the presentation format.
(设置演示格式。)
|
void |
setScale(boolean scale)
Sets the scale.
(设置比例。)
|
void |
setSlideCount(int slideCount)
Sets the slideCount.
(设置幻灯片计数。)
|
void |
setVBADigitalSignature(byte[] signature)
Sets the VBA digital signature for the VBA project embedded in the document.
(为文档中嵌入的 VBA 项目设置 VBA 数字签名。)
|
addSection, clearSections, equals, getByteOrder, getClassID, getFirstSection, getFormat, getOSVersion, getProperties, getProperty, getPropertyStringValue, getSectionCount, getSections, hashCode, isDocumentSummaryInformation, isPropertySetStream, isPropertySetStream, isSummaryInformation, setByteOrder, setClassID, setFormat, setOSVersion, toInputStream, toString, wasNull, write, write
public static final java.lang.String DEFAULT_STREAM_NAME
public static final ClassID[] FORMAT_ID
public DocumentSummaryInformation()
DocumentSummaryInformation
.
(创建一个空的 DocumentSummaryInformation。)
public DocumentSummaryInformation(PropertySet ps) throws UnexpectedPropertySetTypeException
DocumentSummaryInformation
from a given
PropertySet
.
(从给定的 PropertySet 创建 DocumentSummaryInformation。)
ps
- A property set which should be created from a document summary information stream.
(ps - 应该从文档摘要信息流创建的属性集。)
UnexpectedPropertySetTypeException
- if
ps
does not contain a document summary information stream.
(UnexpectedPropertySetTypeException - 如果 ps 不包含文档摘要信息流。)
public DocumentSummaryInformation(java.io.InputStream stream) throws NoPropertySetStreamException, java.io.IOException
DocumentSummaryInformation
instance from an
InputStream
in the Horrible Property Set Format.
The constructor reads the first few bytes from the stream and determines whether it is really a property set stream. If it is, it parses the rest of the stream. If it is not, it resets the stream to its beginning in order to let other components mess around with the data and throws an exception.
(从 Horrible Property Set 格式的 InputStream 创建 DocumentSummaryInformation 实例。构造函数从流中读取前几个字节并确定它是否真的是属性集流。如果是,它会解析流的其余部分。如果不是,它会将流重置为其开头,以便让其他组件弄乱数据并引发异常。)stream
- Holds the data making out the property set stream.
(流 - 保存生成属性集流的数据。)
java.io.IOException
- if the
InputStream
cannot be accessed as needed.
(java.io.IOException - 如果无法根据需要访问 InputStream。)
NoPropertySetStreamException
- if the input stream does not contain a property set.
(NoPropertySetStreamException - 如果输入流不包含属性集。)
public PropertyIDMap getPropertySetIDMap()
PropertySet
getPropertySetIDMap
in class
PropertySet
null
if not applicable
(此集合中属性的 ID 到名称映射,如果不适用,则为 null)
public java.lang.String getCategory()
null
).
(返回类别(或 null)。)
public void setCategory(java.lang.String category)
category
- The category to set.
(category - 要设置的类别。)
public void removeCategory()
public java.lang.String getPresentationFormat()
null
).
(返回演示格式(或 null)。)
public void setPresentationFormat(java.lang.String presentationFormat)
presentationFormat
- The presentation format to set.
(presentationFormat - 要设置的演示格式。)
public void removePresentationFormat()
public int getByteCount()
DocumentSummaryInformation
does not contain a byte count.
(如果 DocumentSummaryInformation 不包含字节计数,则返回字节计数或 0。)
public void setByteCount(int byteCount)
byteCount
- The byte count to set.
(byteCount - 要设置的字节数。)
public void removeByteCount()
public int getLineCount()
DocumentSummaryInformation
does not contain a line count.
(如果 DocumentSummaryInformation 不包含行数,则返回行数或 0。)
public void setLineCount(int lineCount)
lineCount
- The line count to set.
(lineCount - 要设置的行数。)
public void removeLineCount()
public int getParCount()
DocumentSummaryInformation
does not contain a par count.
(如果 DocumentSummaryInformation 不包含标准计数,则返回标准计数或 0。)
public void setParCount(int parCount)
parCount
- The par count to set.
(parCount - 要设置的面值数。)
public void removeParCount()
public int getSlideCount()
DocumentSummaryInformation
does not contain a slide count.
(如果 DocumentSummaryInformation 不包含幻灯片计数,则返回幻灯片计数或 0。)
public void setSlideCount(int slideCount)
slideCount
- The slide count to set.
(slideCount - 要设置的幻灯片计数。)
public void removeSlideCount()
public int getNoteCount()
DocumentSummaryInformation
does not contain a note count.
(如果 DocumentSummaryInformation 不包含注释计数,则返回注释计数或 0。)
public void setNoteCount(int noteCount)
noteCount
- The note count to set.
(noteCount - 要设置的音符计数。)
public void removeNoteCount()
public int getHiddenCount()
DocumentSummaryInformation
does not contain a hidden count.
(如果 DocumentSummaryInformation 不包含隐藏计数,则返回隐藏计数或 0。)
public void setHiddenCount(int hiddenCount)
hiddenCount
- The hidden count to set.
(hiddenCount - 要设置的隐藏计数。)
public void removeHiddenCount()
public int getMMClipCount()
DocumentSummaryInformation
does not contain a mmclip count.
(如果 DocumentSummaryInformation 不包含 mmclip 计数,则返回 mmclip 计数或 0。)
public void setMMClipCount(int mmClipCount)
mmClipCount
- The mmclip count to set.
(mmClipCount - 要设置的 mmclip 计数。)
public void removeMMClipCount()
public boolean getScale()
true
when scaling of the thumbnail is desired,
false
if cropping is desired.
(需要缩放缩略图时返回 true,如果需要裁剪则返回 false。)
public void setScale(boolean scale)
scale
- The scale to set.
(scale - 要设置的比例。)
public void removeScale()
public byte[] getHeadingPair()
Returns the heading pair (or null
) when this method is implemented. Please note that the return type is likely to change!
public void setHeadingPair(byte[] headingPair)
headingPair
- The heading pair to set.
(headingPair - 要设置的标题对。)
public void removeHeadingPair()
public byte[] getDocparts()
Returns the doc parts (or null
) when this method is implemented. Please note that the return type is likely to change!
public void setDocparts(byte[] docparts)
docparts
- The doc parts to set.
(docparts - 要设置的文档部分。)
public void removeDocparts()
public java.lang.String getManager()
null
).
(返回经理(或 null)。)
public void setManager(java.lang.String manager)
manager
- The manager to set.
(manager - 要设置的经理。)
public void removeManager()
public java.lang.String getCompany()
null
).
(返回公司(或 null)。)
public void setCompany(java.lang.String company)
company
- The company to set.
(company - 要设置的公司。)
public void removeCompany()
public boolean getLinksDirty()
true
if the custom links are dirty.
(如果自定义链接脏,则返回 true。)
public void setLinksDirty(boolean linksDirty)
linksDirty
- The links dirty value to set.
(linksDirty - 要设置的链接脏值。)
public void removeLinksDirty()
public int getCharCountWithSpaces()
DocumentSummaryInformation
does not contain this char count.
This is the whitespace-including version of SummaryInformation.getCharCount()
null
(字符数或 null)
public void setCharCountWithSpaces(int count)
count
- The character count to set.
(count - 要设置的字符数。)
public void removeCharCountWithSpaces()
public boolean getHyperlinksChanged()
If it has (true), the hyperlinks should be updated on document load.
(获取用户定义的属性集是否已在应用程序之外更新。如果它有 (true),超链接应该在文档加载时更新。)public void setHyperlinksChanged(boolean changed)
changed
- true, if the User Defined Property Set has been updated
(changed - 如果用户定义的属性集已更新,则为 true)
public void removeHyperlinksChanged()
public int getApplicationVersion()
This will be 0 if no version is set.
(获取编写属性集的应用程序的版本,存储有两个高位字节具有主版本号,两个低位字节是次要版本号。如果没有设置版本,这将为 0。)public void setApplicationVersion(int version)
version
- the Application version
(version - 应用程序版本)
public void removeApplicationVersion()
public byte[] getVBADigitalSignature()
null
).
(返回嵌入在文档中的 VBA 项目的 VBA 数字签名(或 null)。)
public void setVBADigitalSignature(byte[] signature)
signature
- VBA Digital Signature for the project
(签名 - 项目的 VBA 数字签名)
public void removeVBADigitalSignature()
public java.lang.String getContentType()
null
).
(获取文件的内容类型(或 null)。)
public void setContentType(java.lang.String type)
type
- the content type of the file
(type - 文件的内容类型)
public void removeContentType()
public java.lang.String getContentStatus()
null
).
(获取文件的内容状态(或 null)。)
public void setContentStatus(java.lang.String status)
status
- the content status of the file
(status - 文件的内容状态)
public void removeContentStatus()
public java.lang.String getLanguage()
null
).
(获取文档语言,通常未设置且为空(或 null)。)
public void setLanguage(java.lang.String language)
language
- the document language
(语言 - 文档语言)
public void removeLanguage()
public java.lang.String getDocumentVersion()
null
).
(以字符串形式获取文档版本,通常未设置且为空(或 null)。)
public void setDocumentVersion(java.lang.String version)
version
- the document version string
(version - 文档版本字符串)
public void removeDocumentVersion()
public CustomProperties getCustomProperties()
public void setCustomProperties(CustomProperties customProperties)
customProperties
- The custom properties
(customProperties - 自定义属性)
public void removeCustomProperties()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.