org.opencrx.application.uses.net.freeutils.tnef
Class MAPIProps

java.lang.Object
  extended by org.opencrx.application.uses.net.freeutils.tnef.MAPIProps

public class MAPIProps
extends Object

The MAPIProps class encapsulates a collection of MAPI properties.

Since:
2003-08-15
Author:
Amichai Rothman

Constructor Summary
MAPIProps(MAPIProp[] props)
          Creates MAPIProps using the given properties.
MAPIProps(RawInputStream data)
          Creates MAPIProps using the given TNEF stream.
 
Method Summary
 MAPIProp getProp(int ID)
          Gets a property with the given ID.
 MAPIProp getProp(MAPIPropName name)
          Gets a property with the given name.
 MAPIProp[] getProps()
          Gets all the properties.
 Object getPropValue(int ID)
          Gets the first value of a specific MAPI property, if it exists.
 Object getPropValue(MAPIPropName name)
          Gets the first value of a specific MAPI property, if it exists.
protected  int getRawLength()
          Gets the raw data length (in bytes) of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MAPIProps

public MAPIProps(RawInputStream data)
          throws IOException
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

getProps

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

Returns:
all the properties

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

getPropValue

public Object getPropValue(int ID)
                    throws IOException
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)
                    throws IOException
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


This software is published under the BSD license. Copyright © 2003-2013, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.