Package com.independentsoft.msg

# 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 Summary

  Constructors
  Constructor
  Description
  `ExtendedProperty()`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, boolean value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, byte[] value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, double value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, int value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, long value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, short value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, String value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, String[] value)`
  Instantiates a new extended property.
  `ExtendedProperty​(ExtendedPropertyTag tag, Date value)`
  Instantiates a new extended property.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `getBooleanValue()`
  Gets the value as a boolean.
  `Date`
  `getDateTimeValue()`
  Gets the value as a date and time, converted to local time.
  `double`
  `getDoubleValue()`
  Gets the value as a double.
  `float`
  `getFloatValue()`
  Gets the value as a float.
  `int`
  `getIntegerValue()`
  Gets the value as an integer.
  `long`
  `getLongValue()`
  Gets the value as a long.
  `short`
  `getShortValue()`
  Gets the value as a short.
  `String[]`
  `getStringArrayValue()`
  Gets the value as a string array.
  `String`
  `getStringValue()`
  Gets the value as a string.
  `ExtendedPropertyTag`
  `getTag()`
  Gets the tag.
  `byte[]`
  `getValue()`
  Gets the value.
  `void`
  `setTag​(ExtendedPropertyTag tag)`
  Sets the tag.
  `void`
  `setValue​(byte[] value)`
  Sets the value.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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