Save This Page
Home » poi-src-3.1-FINAL-20080629 » org.apache » poi » hpsf » [javadoc | source]
org.apache.poi.hpsf
abstract public class: SpecialPropertySet [javadoc | source]
java.lang.Object
   org.apache.poi.hpsf.PropertySet
      org.apache.poi.hpsf.MutablePropertySet
         org.apache.poi.hpsf.SpecialPropertySet

Direct Known Subclasses:
    DocumentSummaryInformation, SummaryInformation

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. When parsing the data a property set stream consists of (possibly coming from an java.io.InputStream ) we want to read and process each byte only once. Since we don't know in advance which kind of property set we have, we can expect only the most general PropertySet . Creating a special subclass should be as easy as calling the special subclass' constructor and pass the general PropertySet in. To make things easy internally, the special class just holds a reference to the general PropertySet and delegates all method calls to it.

A cleaner implementation would have been like this: The PropertySetFactory parses the stream data into some internal object first. Then it finds out whether the stream is a SummaryInformation , a DocumentSummaryInformation or a general PropertySet . However, the current implementation went the other way round historically: the convenience classes came only late to my mind.

Fields inherited from org.apache.poi.hpsf.PropertySet:
BYTE_ORDER_ASSERTION,  byteOrder,  FORMAT_ASSERTION,  format,  osVersion,  OS_WIN16,  OS_MACINTOSH,  OS_WIN32,  classID,  sections
Constructor:
 public SpecialPropertySet(PropertySet ps) 

    Creates a SpecialPropertySet.

    Parameters:
    ps - The property set to be encapsulated by the SpecialPropertySet
 public SpecialPropertySet(MutablePropertySet ps) 

    Creates a SpecialPropertySet.

    Parameters:
    ps - The mutable property set to be encapsulated by the SpecialPropertySet
Method from org.apache.poi.hpsf.SpecialPropertySet Summary:
addSection,   clearSections,   equals,   getByteOrder,   getClassID,   getFirstSection,   getFormat,   getOSVersion,   getProperties,   getProperty,   getPropertyBooleanValue,   getPropertyIntValue,   getSectionCount,   getSections,   hashCode,   isDocumentSummaryInformation,   isSummaryInformation,   setByteOrder,   setClassID,   setFormat,   setOSVersion,   toInputStream,   toString,   wasNull,   write,   write
Methods from org.apache.poi.hpsf.MutablePropertySet:
addSection,   clearSections,   setByteOrder,   setClassID,   setFormat,   setOSVersion,   toInputStream,   write,   write
Methods from org.apache.poi.hpsf.PropertySet:
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.SpecialPropertySet Detail:
 public  void addSection(Section section) 
 public  void clearSections() 
 public boolean equals(Object o) 
 public int getByteOrder() 
 public ClassID getClassID() 
 public Section getFirstSection() 
 public int getFormat() 
 public int getOSVersion() 
 public Property[] getProperties() throws NoSingleSectionException 
 protected Object getProperty(int id) throws NoSingleSectionException 
 protected boolean getPropertyBooleanValue(int id) throws NoSingleSectionException 
 protected int getPropertyIntValue(int id) throws NoSingleSectionException 
 public int getSectionCount() 
 public List getSections() 
 public int hashCode() 
 public boolean isDocumentSummaryInformation() 
 public boolean isSummaryInformation() 
 public  void setByteOrder(int byteOrder) 
 public  void setClassID(ClassID classID) 
 public  void setFormat(int format) 
 public  void setOSVersion(int osVersion) 
 public InputStream toInputStream() throws IOException, WritingNotSupportedException 
 public String toString() 
 public boolean wasNull() throws NoSingleSectionException 
 public  void write(OutputStream out) throws IOException, WritingNotSupportedException 
 public  void write(DirectoryEntry dir,
    String name) throws IOException, WritingNotSupportedException