net.freeutils.tnef

Class MAPIProps

public class MAPIProps extends Object

The MAPIProps class encapsulates a collection of MAPI properties.

Since: 2003-08-15

Constructor Summary
MAPIProps(RawInputStream data)
Creates MAPIProps using the given TNEF stream.
MAPIProps(MAPIProp[] props)
Creates MAPIProps using the given properties.
Method Summary
MAPIPropgetProp(int ID)
Gets a property with the given ID.
MAPIPropgetProp(MAPIPropName name)
Gets a property with the given name.
MAPIProp[]getProps()
Gets all the properties.
ObjectgetPropValue(int ID)
Gets the first value of a specific MAPI property, if it exists.
ObjectgetPropValue(MAPIPropName name)
Gets the first value of a specific MAPI property, if it exists.
protected intgetRawLength()
Gets the raw data length (in bytes) of this instance.

Constructor Detail

MAPIProps

public MAPIProps(RawInputStream data)
Creates MAPIProps using the given TNEF stream.

Parameters: data the TNEF stream containing property data

Throws: IOException if the stream end is reached, or if an I/O error occurs

MAPIProps

public MAPIProps(MAPIProp[] props)
Creates MAPIProps using the given properties.

Parameters: props an array of MAPI properties

Method Detail

getProp

public MAPIProp getProp(int ID)
Gets a property with the given ID.

Parameters: ID the requested property ID

Returns: the requested property, or null if no such property exists

getProp

public MAPIProp getProp(MAPIPropName name)
Gets a property with the given name.

Parameters: name the requested property name

Returns: the requested property, or null if no such property exists

getProps

public MAPIProp[] getProps()
Gets all the properties.

Returns: all the properties

getPropValue

public Object getPropValue(int ID)
Gets the first value of a specific MAPI property, if it exists. This is a convenience method for single-value properties.

Parameters: ID the ID of the requested property

Returns: the value of the requested property, or null if it does not exist

Throws: IOException if an I/O error occurs

getPropValue

public Object getPropValue(MAPIPropName name)
Gets the first value of a specific MAPI property, if it exists. This is a convenience method for single-value properties.

Parameters: name the name of the requested property

Returns: the value of the requested property, or null if it does not exist

Throws: IOException if an I/O error occurs

getRawLength

protected int getRawLength()
Gets the raw data length (in bytes) of this instance.

Returns: the raw data length (in bytes) of this instance