Package loci.poi.hpsf

Class PropertySet

    • Field Detail

      • byteOrder

        protected int byteOrder

        Specifies this PropertySet's byte order. See the HPFS documentation for details!

      • format

        protected int format

        Specifies this PropertySet's format. See the HPFS documentation for details!

      • osVersion

        protected int osVersion

        Specifies the version of the operating system that created this PropertySet. See the HPFS documentation for details!

      • OS_WIN16

        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.

        See Also:
        Constant Field Values
      • OS_MACINTOSH

        public static final int OS_MACINTOSH

        If the OS version field holds this value the property set stream was created on a Macintosh system.

        See Also:
        Constant Field Values
      • OS_WIN32

        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.

        See Also:
        Constant Field Values
      • classID

        protected ClassID classID

        Specifies this PropertySet's "classID" field. See the HPFS documentation for details!

    • Method Detail

      • getByteOrder

        public int getByteOrder()

        Returns the property set stream's low-level "byte order" field. It is always 0xFFFE .

        Returns:
        The property set stream's low-level "byte order" field.
      • getFormat

        public int getFormat()

        Returns the property set stream's low-level "format" field. It is always 0x0000 .

        Returns:
        The property set stream's low-level "format" field.
      • getOSVersion

        public int getOSVersion()

        Returns the property set stream's low-level "OS version" field.

        Returns:
        The property set stream's low-level "OS version" field.
      • getClassID

        public ClassID getClassID()

        Returns the property set stream's low-level "class ID" field.

        Returns:
        The property set stream's low-level "class ID" field.
      • getSectionCount

        public int getSectionCount()

        Returns the number of Sections in the property set.

        Returns:
        The number of Sections in the property set.
      • getSections

        public List getSections()

        Returns the Sections in the property set.

        Returns:
        The Sections in the property set.
      • isPropertySetStream

        public static boolean isPropertySetStream​(byte[] src,
                                                  int offset,
                                                  int length)

        Checks whether a byte array is in the Horrible Property Set Format.

        Parameters:
        src - The byte array to check.
        offset - The offset in the byte array.
        length - The significant number of bytes in the byte array. Only this number of bytes will be checked.
        Returns:
        true if the byte array is a property set stream, false if not.
      • isSummaryInformation

        public boolean isSummaryInformation()

        Checks whether this PropertySet represents a Summary Information.

        Returns:
        true if this PropertySet represents a Summary Information, else false.
      • isDocumentSummaryInformation

        public boolean isDocumentSummaryInformation()

        Checks whether this PropertySet is a Document Summary Information.

        Returns:
        true if this PropertySet represents a Document Summary Information, else false.
      • getProperty

        protected Object getProperty​(int id)
                              throws NoSingleSectionException

        Convenience method returning the value of the property with the specified ID. If the property is not available, null is returned and a subsequent call to wasNull() will return true .

        Parameters:
        id - The property ID
        Returns:
        The property value
        Throws:
        NoSingleSectionException - if the PropertySet has more or less than one Section.
      • getPropertyBooleanValue

        protected boolean getPropertyBooleanValue​(int id)
                                           throws NoSingleSectionException

        Convenience method returning the value of a boolean property with the specified ID. If the property is not available, false is returned. A subsequent call to wasNull() will return true to let the caller distinguish that case from a real property value of false.

        Parameters:
        id - The property ID
        Returns:
        The property value
        Throws:
        NoSingleSectionException - if the PropertySet has more or less than one Section.
      • getPropertyIntValue

        protected int getPropertyIntValue​(int id)
                                   throws NoSingleSectionException

        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 true to let the caller distinguish that case from a real property value of 0.

        Parameters:
        id - The property ID
        Returns:
        The propertyIntValue value
        Throws:
        NoSingleSectionException - if the PropertySet has more or less than one Section.
      • getSingleSection

        public Section getSingleSection()

        If the PropertySet has only a single section this method returns it.

        Returns:
        The singleSection value
      • equals

        public boolean equals​(Object o)

        Returns true if the PropertySet is equal to the specified parameter, else false.

        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare this PropertySet with
        Returns:
        true if the objects are equal, false if not