net.freeutils.tnef
public class Attr extends Object
Attr
class encapsulates a TNEF attribute. A TNEF stream
consists of a flat list of attributes, which belong either to the message
level or attachment level. An attAttachRenddata attribute marks the
beginning of an attachment, and all subsequent attributes (until the
next attachment begins) belong to it.
Different attributes have a different meaning for the underlying raw data,
thus the getValue() method returns different types of objects. The object
returned is determined by the attribute type, except for several special cases.
Since: 2003-04-25
Field Summary | |
---|---|
static int | atpByte
Attribute type constant. |
static int | atpDate
Attribute type constant. |
static int | atpDword
Attribute type constant. |
static int | atpLong
Attribute type constant. |
static int | atpMax
Attribute type constant. |
static int | atpShort
Attribute type constant. |
static int | atpString
Attribute type constant. |
static int | atpText
Attribute type constant. |
static int | atpTriples
Attribute type constant. |
static int | atpWord
Attribute type constant. |
static int | attAidOwner
Attribute ID constant. |
static int | attAttachCreateDate
Attribute ID constant. |
static int | attAttachData
Attribute ID constant. |
static int | attAttachment
Attribute ID constant. |
static int | attAttachMetaFile
Attribute ID constant. |
static int | attAttachModifyDate
Attribute ID constant. |
static int | attAttachRenddata
Attribute ID constant. |
static int | attAttachTitle
Attribute ID constant. |
static int | attAttachTransportFilename
Attribute ID constant. |
static int | attBody
Attribute ID constant. |
static int | attConversationID
Attribute ID constant. |
static int | attDateEnd
Attribute ID constant. |
static int | attDateModified
Attribute ID constant. |
static int | attDateRecd
Attribute ID constant. |
static int | attDateSent
Attribute ID constant. |
static int | attDateStart
Attribute ID constant. |
static int | attDelegate
Attribute ID constant. |
static int | attFrom
Attribute ID constant. |
static int | attMAPIProps
Attribute ID constant. |
static int | attMessageClass
Attribute ID constant. |
static int | attMessageID
Attribute ID constant. |
static int | attMessageStatus
Attribute ID constant. |
static int | attNull
Attribute ID constant. |
static int | attOemCodepage
Attribute ID constant. |
static int | attOriginalMessageClass
Attribute ID constant. |
static int | attOwner
Attribute ID constant. |
static int | attParentID
Attribute ID constant. |
static int | attPriority
Attribute ID constant. |
static int | attRecipTable
Attribute ID constant. |
static int | attRequestRes
Attribute ID constant. |
static int | attSentFor
Attribute ID constant. |
static int | attSubject
Attribute ID constant. |
static int | attTnefVersion
Attribute ID constant. |
static byte | LVL_ATTACHMENT
Attribute level constant. |
static byte | LVL_MESSAGE
Attribute level constant. |
Constructor Summary | |
---|---|
Attr(byte level, int type, int ID, Object data)
Constructs an Attr containing the specified values.
| |
Attr(byte level, int type, int ID, RawInputStream rawData)
Constructs an Attr containing the specified values.
|
Method Summary | |
---|---|
static Attr | findAttr(List attributes, int ID)
Finds an attribute with the specified ID within given attribute list.
|
int | getID()
Gets the Attr ID.
|
int | getLength()
Gets the Attr data length (in bytes).
|
byte | getLevel()
Gets the Attr level.
|
RawInputStream | getRawData()
Gets the Attr raw data.
|
int | getType()
Gets the Attr type.
|
Object | getValue()
Returns the value of the Attr's data.
|
protected void | read(RawInputStream in)
Reads this attribute's data from the given RawInputStream.
|
String | toString()
Returns a string representation of this object.
|
Parameters: level the attribute level (from LVL_* constants) type the attribute type (from atp* constants) ID the attribute ID (from att* constants) data the attribute data
Parameters: level the attribute level (from LVL_* constants) type the attribute type (from atp* constants) ID the attribute ID (from att* constants) rawData the attribute's raw data
Parameters: attributes the attribute list to search ID the ID of the attribute to search for
Returns: an attribute with given ID found in the attribute list, or null if no such attribute exists
Returns: the Attr ID
Returns: the Attr data length (in bytes), or -1 if it is unknown
Returns: the Attr level
Returns: the Attr raw data
Returns: the Attr type
Returns: the value of the Attr's data
Throws: IOException if an I/O error occurs
Parameters: in the RawInputStream containing attribute data
Throws: IOException if an I/O error occurs
Returns: a string representation of this object