Class PropertiesChunk

  • Direct Known Subclasses:
    MessagePropertiesChunk, StoragePropertiesChunk

    public class PropertiesChunk
    extends 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 Detail

      • 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 IOException
        Writes this chunk in the specified DirectoryEntry.
        Parameters:
        directory - The directory.
        Throws:
        IOException - If an I/O error occurs.