org.apache.poi.hpsf
Class PropertySetFactory

java.lang.Object
  extended by org.apache.poi.hpsf.PropertySetFactory

public class PropertySetFactory
extends java.lang.Object

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

Author:
Rainer Klute <klute@rainer-klute.de>

Constructor Summary
PropertySetFactory()
           
 
Method Summary
static PropertySet create(java.io.InputStream stream)
          Creates the most specific PropertySet from an InputStream.
static DocumentSummaryInformation newDocumentSummaryInformation()
          Creates a new document summary information.
static SummaryInformation newSummaryInformation()
          Creates a new summary information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySetFactory

public PropertySetFactory()
Method Detail

create

public static PropertySet create(java.io.InputStream stream)
                          throws NoPropertySetStreamException,
                                 MarkUnsupportedException,
                                 java.io.UnsupportedEncodingException,
                                 java.io.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 - 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 the mark operation.
java.io.IOException - if some I/O problem occurs.
java.io.UnsupportedEncodingException - if the specified codepage is not supported.

newSummaryInformation

public static SummaryInformation newSummaryInformation()

Creates a new summary information.

Returns:
the new summary information.

newDocumentSummaryInformation

public static DocumentSummaryInformation newDocumentSummaryInformation()

Creates a new document summary information.

Returns:
the new document summary information.


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.