Package com.independentsoft.msg
Class ExtendedProperty
java.lang.Object
com.independentsoft.msg.ExtendedProperty
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
ConstructorsConstructorDescriptionInstantiates a new extended property.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 TypeMethodDescriptionbooleanGets the value as a boolean.Gets the value as a date and time, converted to local time.doubleGets the value as a double.floatGets the value as a float.intGets the value as an integer.longGets the value as a long.shortGets the value as a short.String[]Gets the value as a string array.Gets the value as a string.getTag()Gets the tag.byte[]getValue()Gets the value.voidsetTag(ExtendedPropertyTag tag)Sets the tag.voidsetValue(byte[] value)Sets the value.
-
Constructor Details
-
ExtendedProperty
public ExtendedProperty()Instantiates a new extended property. -
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tag
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value- Throws:
IOException- Signals that an I/O exception has occurred.
-
ExtendedProperty
Instantiates a new extended property.- Parameters:
tag- the tagvalue- the value
-
-
Method Details
-
getStringValue
Gets the value as a string.- Returns:
- the value as a string, or null if the property is not a string type
-
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
falseif 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_VALUEif 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_VALUEif 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_VALUEif 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_VALUEif 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_VALUEif the property is not a 64-bit floating-point type
-
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
Gets the tag.- Returns:
- the tag
-
setTag
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
-