com.aspose.network.outlook
Class MapiProperty

java.lang.Object
  extended by com.aspose.network.outlook.MapiProperty
Direct Known Subclasses:
MapiNamedProperty, MapiObjectProperty

public class MapiProperty
extends Object

Represents the mapi property.


Field Summary
static int FLAG_PROPATTR_MANDATORY
          If this flag is set for a property, that property MUST NOT be deleted from the .MSG file (irrespective of which storage it is contained in) and implementers MUST return an error if any attempt is made to do so.
static int FLAG_PROPATTR_READABLE
          If this flag is not set on a property, that property MUST not be read from the .MSG file and implementers MUST return an error if any attempt is made to read it.
static int FLAG_PROPATTR_WRITABLE
          If this flag is not set on a property, that property MUST not be modified or deleted and implementers MUST return an error if any attempt is made to do so.
static long Signed
           
static long Unsigned
           
 
Constructor Summary
MapiProperty(MapiPropertyTag tag, boolean value, int flags)
          Creates MapiProperty using short as value.
MapiProperty(MapiPropertyTag tag, byte[] data, int flags)
          Creates MapiProperty using data.
MapiProperty(MapiPropertyTag tag, byte[] data, int flags, MapiPropertyName propertyName)
          Creates MapiProperty using data and specify name of the property (NamedProperty).
MapiProperty(MapiPropertyTag tag, com.aspose.network.foundation.DateTime value, int flags)
          Creates MapiProperty using short as value.
MapiProperty(MapiPropertyTag tag, double value, int flags)
          Creates MapiProperty using double as value.
MapiProperty(MapiPropertyTag tag, float value, int flags)
          Creates MapiProperty using float as value.
MapiProperty(MapiPropertyTag tag, int value, int flags)
          Creates MapiProperty using int as value.
MapiProperty(MapiPropertyTag tag, long value, int flags)
          Creates MapiProperty using long as value.
MapiProperty(MapiPropertyTag tag, short value, int flags)
          Creates MapiProperty using short as value.
MapiProperty(MapiPropertyTag tag, String value, int flags)
          Creates MapiProperty using string as value.
MapiProperty(MapiPropertyTag tag, String value, String encoding, int flags)
          Creates MapiProperty using string as value.
MapiProperty(String name, int tag, int signed, byte[] data)
           
 
Method Summary
static byte[] calcDataLong(long byteCount, long delimiter)
           
static MapiProperty createMapiPropertyFromBytes(int propertyTag, byte[] data)
           
static MapiProperty createMapiPropertyFromLong(int propertyTag, int data)
           
static MapiProperty createMapiPropertyFromLong(int propertyTag, int data, int flags)
           
 Boolean getBoolean()
          Gets the first bytes of the binary data as boolean.
 Byte getByte()
          Gets the first byte of the binary data as byte.
 byte[] getData()
          Gets the binary data.
 Date getDate()
          Gets the first bytes of the binary data as datetime.
 Double getDouble()
          Gets the first bytes of the binary data as double.
 Float getFloat()
          Gets the first bytes of the binary data as float.
 Integer getIdentifier()
          Gets the identifier of the named property.
 Integer getInt()
          Gets the first bytes of the binary data as int.
 Long getLong()
          Gets the first bytes of the binary data as long.
 String getName()
          Gets the name of the named property.
 MapiPropertyName getPropertyName()
          Gets the MapiPropertyName.
 MapiPropertyTag getPropertyTag()
          Gets the property tag that specify mapi property
 String getPropertyTagName()
          Gets the PropertyTagName.
 Short getShort()
          Gets the first bytes of the binary data as short.
 long getSigned()
           
 String getString()
          Gets the first bytes of the binary data as string.
 String getString(int codePage)
          Gets the first bytes of the binary data as string using code page.
 boolean isSigned()
          Indicates whether the binary data is signed.
 void setPropertyName(MapiPropertyName propertyName)
          Sets the name of the named property.
 void setSigned(long _signed)
           
 String toString()
          Returns a string representation of the object.
 String toString(int codePage)
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FLAG_PROPATTR_MANDATORY

public static final int FLAG_PROPATTR_MANDATORY
If this flag is set for a property, that property MUST NOT be deleted from the .MSG file (irrespective of which storage it is contained in) and implementers MUST return an error if any attempt is made to do so. This flag is set in circumstances where the implementation depends on that property always being present in the .MSG file once it is written there.

See Also:
Constant Field Values

FLAG_PROPATTR_READABLE

public static final int FLAG_PROPATTR_READABLE
If this flag is not set on a property, that property MUST not be read from the .MSG file and implementers MUST return an error if any attempt is made to read it. This flag is set on all properties unless there is an implementation specific reason to prevent a property from being read from the .MSG file.

See Also:
Constant Field Values

FLAG_PROPATTR_WRITABLE

public static final int FLAG_PROPATTR_WRITABLE
If this flag is not set on a property, that property MUST not be modified or deleted and implementers MUST return an error if any attempt is made to do so. This flag is set in circumstances where the implementation depends on the properties being writable.

See Also:
Constant Field Values

Signed

public static long Signed

Unsigned

public static long Unsigned
Constructor Detail

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    byte[] data,
                    int flags)
Creates MapiProperty using data.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
data - property data
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    byte[] data,
                    int flags,
                    MapiPropertyName propertyName)
Creates MapiProperty using data and specify name of the property (NamedProperty).

Parameters:
tag - specifies mapi property, see MapiPropertyTag
data - property data
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE
propertyName - name of the property

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    boolean value,
                    int flags)
Creates MapiProperty using short as value. MapiPropertyTag should be PT_BOOLEAN.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    com.aspose.network.foundation.DateTime value,
                    int flags)
Creates MapiProperty using short as value. MapiPropertyTag should be PT_BOOLEAN.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    short value,
                    int flags)
Creates MapiProperty using short as value. MapiPropertyTag should be PT_SHORT.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    int value,
                    int flags)
Creates MapiProperty using int as value. MapiPropertyTag should be PT_LONG.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    long value,
                    int flags)
Creates MapiProperty using long as value. MapiPropertyTag should be PT_LONGLONG.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    float value,
                    int flags)
Creates MapiProperty using float as value. MapiPropertyTag should be PT_FLOAT.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    double value,
                    int flags)
Creates MapiProperty using double as value. MapiPropertyTag should be PT_DOUBLE.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    String value,
                    int flags)
Creates MapiProperty using string as value. String is interpreted as UNICODE string. MapiPropertyTag should be PT_UNICODE.

Parameters:
tag - specifies mapi property, see MapiPropertyTag
value - property value
flags - combination of FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE of FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(MapiPropertyTag tag,
                    String value,
                    String encoding,
                    int flags)
Creates MapiProperty using string as value. String is interpreted as ANSI string. MapiPropertyTag should be PT_STRING8.

Parameters:
tag - MapiPropertyTag
value - string property value
encoding - string encoding
flags - can be FLAG_PROPATTR_MANDATORY, FLAG_PROPATTR_READABLE or FLAG_PROPATTR_WRITABLE

MapiProperty

public MapiProperty(String name,
                    int tag,
                    int signed,
                    byte[] data)
Method Detail

getData

public byte[] getData()
Gets the binary data.

Returns:
binary data

getIdentifier

public Integer getIdentifier()
Gets the identifier of the named property.

Returns:
Identifier of the named property

getName

public String getName()
Gets the name of the named property.

Returns:
name of the named property

setPropertyName

public void setPropertyName(MapiPropertyName propertyName)
Sets the name of the named property.

Parameters:
propertyName - name of the named property

getPropertyName

public MapiPropertyName getPropertyName()
Gets the MapiPropertyName.

Returns:
property name, see MapiPropertyName

getPropertyTag

public MapiPropertyTag getPropertyTag()
Gets the property tag that specify mapi property

Returns:
property tag, see MapiPropertyTag

getPropertyTagName

public String getPropertyTagName()
Gets the PropertyTagName.


getBoolean

public Boolean getBoolean()
Gets the first bytes of the binary data as boolean.

Returns:
boolean value

getByte

public Byte getByte()
Gets the first byte of the binary data as byte.

Returns:
byte value

getShort

public Short getShort()
Gets the first bytes of the binary data as short.

Returns:
short value

getInt

public Integer getInt()
Gets the first bytes of the binary data as int.

Returns:
int value

getLong

public Long getLong()
Gets the first bytes of the binary data as long.

Returns:
long value

getFloat

public Float getFloat()
Gets the first bytes of the binary data as float.

Returns:
float value

getDouble

public Double getDouble()
Gets the first bytes of the binary data as double.

Returns:
double value

getString

public String getString()
Gets the first bytes of the binary data as string.

Returns:
string value

getString

public String getString(int codePage)
Gets the first bytes of the binary data as string using code page.

Parameters:
codePage - code page
Returns:
string value

getDate

public Date getDate()
Gets the first bytes of the binary data as datetime.

Returns:
date time value

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
string value

toString

public String toString(int codePage)
Returns a string representation of the object.

Parameters:
codePage - code page
Returns:
string value

getSigned

public long getSigned()

setSigned

public void setSigned(long _signed)

isSigned

public boolean isSigned()
Indicates whether the binary data is signed.


createMapiPropertyFromLong

public static MapiProperty createMapiPropertyFromLong(int propertyTag,
                                                      int data,
                                                      int flags)

createMapiPropertyFromLong

public static MapiProperty createMapiPropertyFromLong(int propertyTag,
                                                      int data)

createMapiPropertyFromBytes

public static MapiProperty createMapiPropertyFromBytes(int propertyTag,
                                                       byte[] data)

calcDataLong

public static byte[] calcDataLong(long byteCount,
                                  long delimiter)


Copyright © 2011 Aspose. All Rights Reserved.