java.lang.Objectorg.apache.poi.hpsf.PropertySet
Direct Known Subclasses:
MutablePropertySet, DocumentSummaryInformation, SpecialPropertySet, SummaryInformation
Represents a property set in the Horrible Property Set Format (HPSF). These are usually metadata of a Microsoft Office document.
An application that wants to access these metadata should create an instance of this class or one of its subclasses by calling the factory method PropertySetFactory#create and then retrieve the information its needs by calling appropriate methods.
PropertySetFactory#create does its work by calling one of the constructors PropertySet#PropertySet(InputStream) or PropertySet#PropertySet(byte[]) . If the constructor's argument is not in the Horrible Property Set Format, i.e. not a property set stream, or if any other error occurs, an appropriate exception is thrown.
A PropertySet has a list of Section s, and each Section has a Property array. Use #getSections to retrieve the Section s, then call Section#getProperties for each Section to get hold of the Property arrays.
Since the vast majority of PropertySet s contains only a single Section , the convenience method #getProperties returns the properties of a PropertySet 's Section (throwing a NoSingleSectionException if the PropertySet contains more (or less) than exactly one Section ).Rainer - Klute <klute@rainer-klute.de>Drew - Varner (Drew.Varner hanginIn sc.edu)$ - Id: PropertySet.java 643670 2008-04-02 00:50:45Z klute $2002-02-09 - | Field Summary | ||
|---|---|---|
| static final byte[] | BYTE_ORDER_ASSERTION | The "byteOrder" field must equal this value. |
| protected int | byteOrder | Specifies this PropertySet 's byte order. See the HPFS documentation for details! |
| static final byte[] | FORMAT_ASSERTION | The "format" field must equal this value. |
| protected int | format | Specifies this PropertySet 's format. See the HPFS documentation for details! |
| protected int | osVersion | Specifies the version of the operating system that created this PropertySet . See the HPFS documentation for details! |
| public static final int | OS_WIN16 | If the OS version field holds this value the property set stream was created on a 16-bit Windows system. |
| public static final int | OS_MACINTOSH | If the OS version field holds this value the property set stream was created on a Macintosh system. |
| public static final int | OS_WIN32 | If the OS version field holds this value the property set stream was created on a 32-bit Windows system. |
| protected ClassID | classID | Specifies this PropertySet 's "classID" field. See the HPFS documentation for details! |
| protected List | sections | The sections in this PropertySet . |
| Constructor: |
|---|
Creates an empty (uninitialized) PropertySet . Please note: For the time being this constructor is protected since it is used for internal purposes only, but expect it to become public once the property set's writing functionality is implemented. |
Creates a PropertySet instance from an InputStream in the Horrible Property Set Format. The constructor reads the first few bytes from the stream and determines whether it is really a property set stream. If it is, it parses the rest of the stream. If it is not, it resets the stream to its beginning in order to let other components mess around with the data and throws an exception.
|
Creates a PropertySet instance from a byte array that represents a stream in the Horrible Property Set Format.
|
Creates a PropertySet instance from a byte array that represents a stream in the Horrible Property Set Format.
|
| Method from org.apache.poi.hpsf.PropertySet Summary: |
|---|
| equals, getByteOrder, getClassID, getFirstSection, getFormat, getOSVersion, getProperties, getProperty, getPropertyBooleanValue, getPropertyIntValue, getSectionCount, getSections, getSingleSection, hashCode, isDocumentSummaryInformation, isPropertySetStream, isPropertySetStream, isSummaryInformation, toString, wasNull |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.poi.hpsf.PropertySet Detail: |
|---|
Returns |
Returns the property set stream's low-level "byte order" field. It is always 0xFFFE . |
Returns the property set stream's low-level "class ID" field. |
Gets the PropertySet 's first section. |
Returns the property set stream's low-level "format" field. It is always 0x0000 . |
Returns the property set stream's low-level "OS version" field. |
Convenience method returning the Property array contained in this property set. It is a shortcut for getting the PropertySet 's Section s list and then getting the Property array from the first Section . |
Convenience method returning the value of the property with
the specified ID. If the property is not available,
|
Convenience method returning the value of a boolean property
with the specified ID. If the property is not available,
|
Convenience method returning the value of the numeric
property with the specified ID. If the property is not
available, 0 is returned. A subsequent call to #wasNull
will return |
Returns the number of Section s in the property set. |
Returns the Section s in the property set. |
If the PropertySet has only a single section this method returns it. |
|
Checks whether this PropertySet is a Document Summary Information. |
Checks whether an InputStream is in the Horrible Property Set Format. |
Checks whether a byte array is in the Horrible Property Set Format. |
Checks whether this PropertySet represents a Summary Information. |
|
Checks whether the property which the last call to #getPropertyIntValue or #getProperty tried to access was available or not. This information might be important for callers of #getPropertyIntValue since the latter returns 0 if the property does not exist. Using #wasNull , the caller can distiguish this case from a property's real value of 0. |