public class PropertySetFactory
extends java.lang.Object
SummaryInformation
,
DocumentSummaryInformation
and
PropertySet
.
(用于创建 SummaryInformation、DocumentSummaryInformation 和 PropertySet 实例的工厂类。)
Constructor and Description |
---|
PropertySetFactory() |
Modifier and Type | Method and Description |
---|---|
static PropertySet |
create(DirectoryEntry dir, java.lang.String name)
Creates the most specific
PropertySet from an entry in the specified POIFS Directory.
(从指定 POIFS 目录中的条目创建最具体的 PropertySet。)
|
static PropertySet |
create(java.io.InputStream stream)
|
static DocumentSummaryInformation |
newDocumentSummaryInformation()
Creates a new document summary information.
(创建一个新的文档摘要信息。)
|
static SummaryInformation |
newSummaryInformation()
Creates a new summary information.
(创建新的摘要信息。)
|
public static PropertySet create(DirectoryEntry dir, java.lang.String name) throws java.io.FileNotFoundException, NoPropertySetStreamException, java.io.IOException, java.io.UnsupportedEncodingException
PropertySet
from an entry in the specified POIFS Directory. This is preferrably a
DocumentSummaryInformation
or a
SummaryInformation
. If the specified entry does not contain a property set stream, an exception is thrown. If no entry is found with the given name, an exception is thrown.
(从指定 POIFS 目录中的条目创建最具体的 PropertySet。这最好是 DocumentSummaryInformation 或 SummaryInformation。如果指定的条目不包含属性集流,则会引发异常。如果没有找到具有给定名称的条目,则会引发异常。)
dir
- The directory to find the PropertySet in
(dir - 找到 PropertySet 的目录)
name
- The name of the entry containing the PropertySet
(name - 包含 PropertySet 的条目的名称)
PropertySet
.
(创建的 PropertySet。)
java.io.FileNotFoundException
- if there is no entry with that name
(java.io.FileNotFoundException - 如果没有具有该名称的条目)
NoPropertySetStreamException
- if the stream does not contain a property set.
(NoPropertySetStreamException - 如果流不包含属性集。)
java.io.IOException
- if some I/O problem occurs.
(java.io.IOException - 如果出现一些 I/O 问题。)
java.io.UnsupportedEncodingException
- if the specified codepage is not supported.
(java.io.UnsupportedEncodingException - 如果指定的代码页不受支持。)
public static PropertySet create(java.io.InputStream stream) throws NoPropertySetStreamException, MarkUnsupportedException, java.io.UnsupportedEncodingException, java.io.IOException
PropertySet
from an
InputStream
. This is preferrably a
DocumentSummaryInformation
or a
SummaryInformation
. If the specified
InputStream
does not contain a property set stream, an exception is thrown and the
InputStream
is repositioned at its beginning.
(从 InputStream 创建最具体的 PropertySet。这最好是 DocumentSummaryInformation 或 SummaryInformation。如果指定的 InputStream 不包含属性集流,则会引发异常并将 InputStream 重新定位在其开头。)
stream
- Contains the property set stream's data.
(stream - 包含属性集流的数据。)
PropertySet
.
(创建的 PropertySet。)
NoPropertySetStreamException
- if the stream does not contain a property set.
(NoPropertySetStreamException - 如果流不包含属性集。)
MarkUnsupportedException
- if the stream does not support the
mark
operation.
(MarkUnsupportedException - 如果流不支持标记操作。)
java.io.IOException
- if some I/O problem occurs.
(java.io.IOException - 如果出现一些 I/O 问题。)
java.io.UnsupportedEncodingException
- if the specified codepage is not supported.
(java.io.UnsupportedEncodingException - 如果指定的代码页不受支持。)
public static SummaryInformation newSummaryInformation()
public static DocumentSummaryInformation newDocumentSummaryInformation()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.