Class PropertiesChunk

  • Direct Known Subclasses:
    MessagePropertiesChunk, StoragePropertiesChunk

    public class PropertiesChunk
    extends java.lang.Object
    Handles the writing of MAPIProperty instances. This file is based on PropertiesChunk.

    This class provides a basic implementation to write fixed-length and variable-length properties to a POIFSFileSystem, but it doesn't handle the other data such as list properties (since point 2.4.2.2) or GUID/Entry/String streams (point 2.2.3). Those would be needed to make a more advanced integration with Microsoft Outlook and take advantage of other features, like appointments, calendars, ...

    Author:
    Cedric Tabin
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FLAG_READABLE
      Flag to set for readable properties.
      static int FLAG_WRITEABLE
      Flag to set for writable properties.
      static java.lang.String PREFIX
      Standard prefix of nodes.
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertiesChunk()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.poi.hsmf.datatypes.PropertyValue getProperty​(org.apache.poi.hsmf.datatypes.MAPIProperty property)  
      void setProperty​(org.apache.poi.hsmf.datatypes.PropertyValue value)
      Defines a property.
      void writeTo​(org.apache.poi.poifs.filesystem.DirectoryEntry directory)
      Writes this chunk in the specified DirectoryEntry.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PREFIX

        public static final java.lang.String PREFIX
        Standard prefix of nodes. Defined by the MS specification.
        See Also:
        Constant Field Values
      • FLAG_READABLE

        public static final int FLAG_READABLE
        Flag to set for readable properties. Defined by the MS specification.
        See Also:
        Constant Field Values
      • FLAG_WRITEABLE

        public static final int FLAG_WRITEABLE
        Flag to set for writable properties. Defined by the MS specification.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PropertiesChunk

        public PropertiesChunk()
    • Method Detail

      • setProperty

        public void setProperty​(org.apache.poi.hsmf.datatypes.PropertyValue value)
        Defines a property. Multi-valued properties are not yet supported.
      • getProperty

        public org.apache.poi.hsmf.datatypes.PropertyValue getProperty​(org.apache.poi.hsmf.datatypes.MAPIProperty property)
      • writeTo

        public void writeTo​(org.apache.poi.poifs.filesystem.DirectoryEntry directory)
                     throws java.io.IOException
        Writes this chunk in the specified DirectoryEntry.
        Parameters:
        directory - The directory.
        Throws:
        java.io.IOException - If an I/O error occurs.