Class ExtendedProperty

java.lang.Object
com.independentsoft.msg.ExtendedProperty

public class ExtendedProperty extends Object
Represents a named (extended) MAPI property, pairing an ExtendedPropertyTag that identifies the property with its raw binary value. Typed accessors such as getStringValue(), getIntegerValue() and getDateTimeValue() interpret the value according to the tag's type.
  • Constructor Details

    • ExtendedProperty

      public ExtendedProperty()
      Instantiates a new extended property.
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, String value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, short value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, int value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, long value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, double value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, boolean value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, Date value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, String[] value) throws IOException
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • ExtendedProperty

      public ExtendedProperty(ExtendedPropertyTag tag, byte[] value)
      Instantiates a new extended property.
      Parameters:
      tag - the tag
      value - the value
  • Method Details

    • getStringValue

      public String getStringValue()
      Gets the value as a string.
      Returns:
      the value as a string, or null if the property is not a string type
    • getStringArrayValue

      public String[] getStringArrayValue()
      Gets the value as a string array.
      Returns:
      the value as a string array, or null if the property is not a multiple-value string type
    • getBooleanValue

      public boolean getBooleanValue()
      Gets the value as a boolean.
      Returns:
      the value as a boolean, or false if the property is not a boolean type
    • getShortValue

      public short getShortValue()
      Gets the value as a short.
      Returns:
      the value as a short, or Short.MIN_VALUE if the property is not a 16-bit integer type
    • getIntegerValue

      public int getIntegerValue()
      Gets the value as an integer.
      Returns:
      the value as an integer, or Integer.MIN_VALUE if the property is not a 32-bit integer type
    • getLongValue

      public long getLongValue()
      Gets the value as a long.
      Returns:
      the value as a long, or Long.MIN_VALUE if the property is not a 64-bit integer type
    • getFloatValue

      public float getFloatValue()
      Gets the value as a float.
      Returns:
      the value as a float, or Float.MIN_VALUE if the property is not a 32-bit floating-point type
    • getDoubleValue

      public double getDoubleValue()
      Gets the value as a double.
      Returns:
      the value as a double, or Double.MIN_VALUE if the property is not a 64-bit floating-point type
    • getDateTimeValue

      public Date getDateTimeValue()
      Gets the value as a date and time, converted to local time.
      Returns:
      the value as a Date, or null if the property is not a time type or the stored date is invalid
    • getTag

      public ExtendedPropertyTag getTag()
      Gets the tag.
      Returns:
      the tag
    • setTag

      public void setTag(ExtendedPropertyTag tag)
      Sets the tag.
      Parameters:
      tag - the new tag
    • getValue

      public byte[] getValue()
      Gets the value.
      Returns:
      the value
    • setValue

      public void setValue(byte[] value)
      Sets the value.
      Parameters:
      value - the new value