org.enableit.tools.email.interfaces
Class Attachment
java.lang.Object
|
+--org.enableit.tools.email.interfaces.Attachment
- All Implemented Interfaces:
- java.io.Serializable
- public class Attachment
- extends java.lang.Object
- implements java.io.Serializable
A JavaBean
encapsulating the data for an email attachment.
- Author:
- Tim Stephenson
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
ABOUT
CVS info about this class and its current version |
Constructor Summary |
Attachment(java.io.File attachment)
Constructor for a File attachment. |
Attachment(java.lang.Object attachment,
java.lang.String mimeType,
java.lang.String name)
Constructor setting all the properties in one go. |
Attachment(java.net.URL attachment)
Constructor for a URL attachment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ABOUT
public static final java.lang.String ABOUT
- CVS info about this class and its current version
Attachment
public Attachment(java.io.File attachment)
- Constructor for a
File
attachment.
- Parameters:
attachment
- File to attach.
Mime type and name will be derived from the File.
Attachment
public Attachment(java.net.URL attachment)
- Constructor for a
URL
attachment.
- Parameters:
attachment
- URL to attach.
Mime type and name will be derived from the URL.
Attachment
public Attachment(java.lang.Object attachment,
java.lang.String mimeType,
java.lang.String name)
- Constructor setting all the properties in one go.
- Parameters:
attachment
- Object to attach.mimeType
- The mime type of the object. Note that the Mime
type must be recognised by the Java activation framework.name
- Name to give to the attachment.
getAttachment
public java.lang.Object getAttachment()
- Returns:
- The attachment object.
setAttachment
public void setAttachment(java.lang.Object attachment)
- Parameters:
attachment
- New attachment object.
getMimeType
public java.lang.String getMimeType()
- Returns:
- The mime type of the attachment.
setMimeType
public void setMimeType(java.lang.String mimeType)
- Parameters:
mimeType
- The mime Type of this attachment.
getName
public java.lang.String getName()
- Returns:
- The name to give the attachment.
setName
public void setName(java.lang.String name)
- Parameters:
name
- The name to give the attachment.
Copyright © 1999-2003 enableIT.org. All Rights Reserved.