| org.apache.poi.hpsf.basic | |
| org.apache.poi.hpsf.examples | |
| org.apache.poi.hpsf.extractor | |
| org.apache.poi.hpsf.wellknown | Specific support for DocumentSummaryInformation, SummaryInformation types. |
| SpecialPropertySet | Abstract superclass for the convenience classes SummaryInformation and DocumentSummaryInformation . The motivation behind this class is quite nasty if you look behind the scenes, but it serves the application programmer well by providing him with the easy-to-use SummaryInformation and DocumentSummaryInformation classes. |
code | html |
| UnsupportedVariantTypeException | This exception is thrown if HPSF encounters a variant type that isn't supported yet. |
code | html |
| VariantTypeException | This exception is thrown if HPSF encounters a problem with a variant type. |
code | html |
| ClassID | Represents a class ID (16 bytes). |
code | html |
| Constants | Defines constants of general use. |
code | html |
| CustomProperties | Maintains the instances of CustomProperty that belong to a DocumentSummaryInformation . |
code | html |
| CustomProperty | This class represents custum properties in the document summary information stream. |
code | html |
| DocumentSummaryInformation | Convenience class representing a DocumentSummary Information stream in a Microsoft Office document. |
code | html |
| HPSFException | This exception is the superclass of all other checked exceptions thrown in this package. |
code | html |
| HPSFRuntimeException | This exception is the superclass of all other unchecked exceptions thrown in this package. |
code | html |
| IllegalPropertySetDataException | This exception is thrown when there is an illegal value set in a PropertySet . |
code | html |
| IllegalVariantTypeException | This exception is thrown if HPSF encounters a variant type that is illegal in the current context. |
code | html |
| MarkUnsupportedException | This exception is thrown if an java.io.InputStream does not support the java.io.InputStream#mark operation. |
code | html |
| MissingSectionException | This exception is thrown if one of the PropertySet 's convenience methods does not find a required Section . The constructors of this class are analogous to those of its superclass and documented there. |
code | html |
| MutableProperty | Adds writing capability to the Property class. Please be aware that this class' functionality will be merged into the Property class at a later time, so the API will change. |
code | html |
| MutablePropertySet | Adds writing support to the PropertySet class. Please be aware that this class' functionality will be merged into the PropertySet class at a later time, so the API will change. |
code | html |
| MutableSection | Adds writing capability to the Section class. Please be aware that this class' functionality will be merged into the Section class at a later time, so the API will change. |
code | html |
| NoFormatIDException | This exception is thrown if a MutablePropertySet is to be written but does not have a formatID set (see MutableSection#setFormatID(ClassID) or org.apache.poi.hpsf.MutableSection#setFormatID(byte[]) . |
code | html |
| NoPropertySetStreamException | This exception is thrown if a format error in a property set stream is detected or when the input data do not constitute a property set stream. The constructors of this class are analogous to those of its superclass and are documented there. |
code | html |
| NoSingleSectionException | This exception is thrown if one of the PropertySet 's convenience methods that require a single Section is called and the PropertySet does not contain exactly one Section . The constructors of this class are analogous to those of its superclass and documented there. |
code | html |
| Property | A property in a Section of a PropertySet . The property's ID gives the property a meaning in the context of its Section . |
code | html |
| PropertySet | Represents a property set in the Horrible Property Set Format (HPSF). |
code | html |
| PropertySetFactory | Factory class to create instances of SummaryInformation , DocumentSummaryInformation and PropertySet . |
code | html |
| ReadingNotSupportedException | This exception is thrown when HPSF tries to read a (yet) unsupported variant type. |
code | html |
| Section | Represents a section in a PropertySet . |
code | html |
| Section.PropertyListEntry | Represents an entry in the property list and holds a property's ID and its offset from the section's beginning. |
code | html |
| SummaryInformation | Convenience class representing a Summary Information stream in a Microsoft Office document. |
code | html |
| Thumbnail | Class to manipulate data in the Clipboard Variant ( VT_CF ) format. |
code | html |
| TypeReader | Reader for specific data types. |
code | html |
| TypeWriter | Class for writing little-endian data and more. |
code | html |
| UnexpectedPropertySetTypeException | This exception is thrown if a certain type of property set is expected (e.g. |
code | html |
| Util | Provides various static utility methods. |
code | html |
| Variant | The Variant types as defined by Microsoft's COM. |
code | html |
| VariantSupport | Supports reading and writing of variant data. FIXME (3): Reading and writing should be made more uniform than it is now. |
code | html |
| WritingNotSupportedException | This exception is thrown when trying to write a (yet) unsupported variant type. |
code | html |
Processes streams in the Horrible Property Set Format (HPSF) in POI filesystems. Microsoft Office documents, i.e. POI filesystems, usually contain meta data like author, title, last saving time etc. These items are called properties and stored in property set streams along with the document itself. These streams are commonly named \005SummaryInformation and \005DocumentSummaryInformation. However, a POI filesystem may contain further property sets of other names or types.
In order to extract the properties from a POI filesystem, a property set stream's contents must be parsed into a org.apache.poi.hpsf.PropertySet instance. Its subclasses org.apache.poi.hpsf.SummaryInformation and org.apache.poi.hpsf.DocumentSummaryInformation deal with the well-known property set streams \005SummaryInformation and \005DocumentSummaryInformation. (However, the streams' names are irrelevant. What counts is the property set's first section's format ID - see below.)
The factory method org.apache.poi.hpsf.PropertySetFactory#create creates a org.apache.poi.hpsf.PropertySet instance. This method always returns the most specific property set: If it identifies the stream data as a Summary Information or as a Document Summary Information it returns an instance of the corresponding class, else the general org.apache.poi.hpsf.PropertySet .
A org.apache.poi.hpsf.PropertySet contains a list of org.apache.poi.hpsf.Section s which can be retrieved with org.apache.poi.hpsf.PropertySet#getSections . Each org.apache.poi.hpsf.Section contains a org.apache.poi.hpsf.Property array which can be retrieved with org.apache.poi.hpsf.Section#getProperties . Since the vast majority of org.apache.poi.hpsf.PropertySet s contains only a single org.apache.poi.hpsf.Section , the convenience method org.apache.poi.hpsf.PropertySet#getProperties returns the properties of a org.apache.poi.hpsf.PropertySet 's org.apache.poi.hpsf.Section (throwing a org.apache.poi.hpsf.NoSingleSectionException if the org.apache.poi.hpsf.PropertySet contains more (or less) than exactly one org.apache.poi.hpsf.Section ).
Each org.apache.poi.hpsf.Property has an ID, a type, and a value which can be retrieved with org.apache.poi.hpsf.Property#getID , org.apache.poi.hpsf.Property#getType , and org.apache.poi.hpsf.Property#getValue , respectively. The value's class depends on the property's type. The current implementation does not yet support all property types and restricts the values' classes to java.lang.String , java.lang.Integer and java.util.Date . A value of a yet unknown type is returned as a byte array containing the value's origin bytes from the property set stream.
To retrieve the value of a specific org.apache.poi.hpsf.Property , use org.apache.poi.hpsf.Section#getProperty or org.apache.poi.hpsf.Section#getPropertyIntValue .
The org.apache.poi.hpsf.SummaryInformation and org.apache.poi.hpsf.DocumentSummaryInformation classes provide convenience methods for retrieving well-known properties. For example, an application that wants to retrieve a document's title string just calls org.apache.poi.hpsf.SummaryInformation#getTitle instead of going through the hassle of first finding out what the title's property ID is and then using this ID to get the property's value.
Writing properties can be done with the classes org.apache.poi.hpsf.MutablePropertySet , org.apache.poi.hpsf.MutableSection , and org.apache.poi.hpsf.MutableProperty .
Public documentation from Microsoft can be found in the appropriate section of the MSDN Library.
org.apache.poi.hpsf.PropertySetFactory#create(InputStream) no longer throws an org.apache.poi.hpsf.UnexpectedPropertySetTypeException .
The following is still left to be implemented. Sponsering could foster these issues considerably.
Convenience methods for setting summary information and document summary information properties
Better codepage support
Support for more property (variant) types
@author Rainer Klute (klute@rainer-klute.de) @version $Id: package.html 496526 2007-01-15 22:46:35Z markt $ @since 2002-02-09