Package org.apache.poi.hpsf
Class PropertySetFactory
java.lang.Object
org.apache.poi.hpsf.PropertySetFactory
Factory class to create instances of
SummaryInformation
,
DocumentSummaryInformation
and PropertySet
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertySet
create
(InputStream stream) Creates the most specificPropertySet
from anInputStream
.static PropertySet
create
(DirectoryEntry dir, String name) Creates the most specificPropertySet
from an entry in the specified POIFS Directory.static DocumentSummaryInformation
Creates a new document summary information.static SummaryInformation
Creates a new summary information.
-
Constructor Details
-
PropertySetFactory
public PropertySetFactory()
-
-
Method Details
-
create
public static PropertySet create(DirectoryEntry dir, String name) throws FileNotFoundException, NoPropertySetStreamException, IOException, UnsupportedEncodingException Creates the most specificPropertySet
from an entry in the specified POIFS Directory. This is preferrably aDocumentSummaryInformation
or aSummaryInformation
. 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.- Parameters:
dir
- The directory to find the PropertySet inname
- The name of the entry containing the PropertySet- Returns:
- The created
PropertySet
. - Throws:
FileNotFoundException
- if there is no entry with that nameNoPropertySetStreamException
- if the stream does not contain a property set.IOException
- if some I/O problem occurs.UnsupportedEncodingException
- if the specified codepage is not supported.
-
create
public static PropertySet create(InputStream stream) throws NoPropertySetStreamException, MarkUnsupportedException, UnsupportedEncodingException, IOException Creates the most specificPropertySet
from anInputStream
. This is preferrably aDocumentSummaryInformation
or aSummaryInformation
. If the specifiedInputStream
does not contain a property set stream, an exception is thrown and theInputStream
is repositioned at its beginning.- Parameters:
stream
- Contains the property set stream's data.- Returns:
- The created
PropertySet
. - Throws:
NoPropertySetStreamException
- if the stream does not contain a property set.MarkUnsupportedException
- if the stream does not support themark
operation.IOException
- if some I/O problem occurs.UnsupportedEncodingException
- if the specified codepage is not supported.
-
newSummaryInformation
Creates a new summary information.- Returns:
- the new summary information.
-
newDocumentSummaryInformation
Creates a new document summary information.- Returns:
- the new document summary information.
-