Top Description Constructors Methods
org.apache.poi.hpsf

public Class PropertySetFactory

extends Object
Class Inheritance
Imports
java.io.FileNotFoundException, .IOException, .InputStream, .UnsupportedEncodingException, org.apache.poi.poifs.filesystem.DirectoryEntry, .DirectoryNode, .DocumentInputStream, org.apache.poi.util.LittleEndianInputStream

Factory class to create instances of SummaryInformation, DocumentSummaryInformation and PropertySet.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static PropertySet

Returns:

The created PropertySet.
create
(final DirectoryEntry
The directory to find the PropertySet in
dir
,
final String
The name of the entry containing the PropertySet
name
)

Creates the most specific PropertySet from an entry in the specified POIFS Directory.

public static PropertySet

Returns:

The created PropertySet.
create
(final InputStream
Contains the property set stream's data.
stream
)

Creates the most specific PropertySet from an InputStream.

public static DocumentSummaryInformation

Returns:

the new document summary information.
newDocumentSummaryInformation
()

Creates a new document summary information.

public static SummaryInformation

Returns:

the new summary information.
newSummaryInformation
()

Creates a new summary information.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PropertySetFactoryback to summary
public PropertySetFactory()

Method Detail

createback to summary
public static PropertySet create(final DirectoryEntry dir, final String name) throws FileNotFoundException, NoPropertySetStreamException, IOException, UnsupportedEncodingException

Creates the most specific 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.

Parameters
dir:DirectoryEntry

The directory to find the PropertySet in

name:String

The name of the entry containing the PropertySet

Returns:PropertySet

The created PropertySet.

Exceptions
FileNotFoundException:
if there is no entry with that name
NoPropertySetStreamException:
if the stream does not contain a property set.
IOException:
if some I/O problem occurs.
UnsupportedEncodingException:
if the specified codepage is not supported.
createback to summary
public static PropertySet create(final InputStream stream) throws NoPropertySetStreamException, IOException

Creates the most specific 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.

Parameters
stream:InputStream

Contains the property set stream's data.

Returns:PropertySet

The created PropertySet.

Exceptions
NoPropertySetStreamException:
if the stream does not contain a property set.
IOException:
if some I/O problem occurs.
UnsupportedEncodingException:
if the specified codepage is not supported.
newDocumentSummaryInformationback to summary
public static DocumentSummaryInformation newDocumentSummaryInformation()

Creates a new document summary information.

Returns:DocumentSummaryInformation

the new document summary information.

newSummaryInformationback to summary
public static SummaryInformation newSummaryInformation()

Creates a new summary information.

Returns:SummaryInformation

the new summary information.