Class PropertiesChunk

java.lang.Object
org.apache.poi.hsmf.datatypes.Chunk
org.apache.poi.hsmf.datatypes.PropertiesChunk
Direct Known Subclasses:
MessagePropertiesChunk, StoragePropertiesChunk

public abstract class PropertiesChunk extends Chunk

A Chunk which holds (single) fixed-length properties, and pointer to the variable length ones / multi-valued ones (which get their own chunk).

There are two kinds of PropertiesChunks, which differ only in their headers.

  • Field Details

  • Method Details

    • setMaxRecordLength

      public static void setMaxRecordLength(int length)
      Parameters:
      length - the max record length allowed for PropertiesChunk
    • getMaxRecordLength

      public static int getMaxRecordLength()
      Returns:
      the max record length allowed for PropertiesChunk
    • getEntryName

      public String getEntryName()
      Description copied from class: Chunk
      Creates a string to use to identify this chunk in the POI file system object.
      Overrides:
      getEntryName in class Chunk
    • getRawProperties

      public Map<MAPIProperty,PropertyValue> getRawProperties()
      Returns all the properties in the chunk, without looking up any chunk-based values
    • getProperties

      public Map<MAPIProperty,List<PropertyValue>> getProperties()

      Returns all the properties in the chunk, along with their values.

      Any chunk-based values will be looked up and returned as such

    • setProperty

      public void setProperty(PropertyValue value)
      Defines a property. Multi-valued properties are not yet supported.
    • getValues

      public List<PropertyValue> getValues(MAPIProperty property)
      Returns all values for the given property, looking up chunk based ones as required, of null if none exist
    • getRawValue

      public PropertyValue getRawValue(MAPIProperty property)
      Returns the value / pointer to the value chunk of the property, or null if none exists
    • writeProperties

      public void writeProperties(DirectoryEntry directory) throws IOException
      Writes this chunk in the specified DirectoryEntry.
      Parameters:
      directory - The directory.
      Throws:
      IOException - If an I/O error occurs.