public class Attachment extends Object
Attachment
class encapsulates a TNEF message attachment.Constructor and Description |
---|
Attachment()
Constructs an empty Attachment.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Attr attr)
Adds an Attachment attribute.
|
Attr |
getAttribute(int ID)
Gets a specific Attachment attribute.
|
List |
getAttributes()
Gets the Attachment attributes.
|
String |
getFilename()
Gets the Attachment filename.
|
MAPIProps |
getMAPIProps()
Gets the Attachment MAPI properties.
|
Message |
getNestedMessage()
Gets the Attachment nested message.
|
RawInputStream |
getRawData()
Gets the Attachment raw data.
|
void |
setAttributes(List attributes)
Sets the Attachment attributes.
|
void |
setFilename(String filename)
Sets the Attachment filename.
|
void |
setMAPIProps(MAPIProps MAPIProps)
Sets this Attachment's MAPI properties.
|
void |
setNestedMessage(Message nestedMessage)
Sets the Attachment nested message.
|
void |
setRawData(RawInputStream rawData)
Sets the Attachment raw data.
|
String |
toString()
Returns a string representation of this object.
|
void |
writeTo(OutputStream out)
Writes the content of this attachment to a stream.
|
void |
writeTo(String filename)
Writes the content of this attachment to a file.
|
public List getAttributes()
public void setAttributes(List attributes)
attributes
- the Attachment attributespublic Attr getAttribute(int ID)
ID
- the requested attribute IDpublic String getFilename()
public void setFilename(String filename)
filename
- the Attachment filenamepublic void addAttribute(Attr attr)
attr
- the Attachment attribute to addpublic RawInputStream getRawData()
public void setRawData(RawInputStream rawData)
rawData
- the Attachment raw datapublic Message getNestedMessage()
public void setNestedMessage(Message nestedMessage)
nestedMessage
- the Attachment nested messagepublic MAPIProps getMAPIProps()
public String toString()
public void setMAPIProps(MAPIProps MAPIProps) throws IOException
MAPIProps
- a collection of properties to setIOException
- if an I/O error occurspublic void writeTo(String filename) throws IOException
filename
- the fully qualified filename to which the attachment
content should be writtenIOException
- if an I/O error occurspublic void writeTo(OutputStream out) throws IOException
out
- the OutputStream to which the attachment
content should be writtenIOException
- if an I/O error occursThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.