org.apache.commons.mail
Class EmailAttachment

java.lang.Object
  extended byorg.apache.commons.mail.EmailAttachment

public class EmailAttachment
extends java.lang.Object

This class models an email attachment. Used by MultiPartEmail.

Since:
1.0
Version:
$Id: EmailAttachment.java 225600 2005-07-27 20:16:23Z rdonkin $
Author:
Frank Y. Kim

Field Summary
static java.lang.String ATTACHMENT
          Definition of the part being an attachment
private  java.lang.String description
          The description of this attachment.
private  java.lang.String disposition
          The disposition.
static java.lang.String INLINE
          Definition of the part being inline
private  java.lang.String name
          The name of this attachment.
private  java.lang.String path
          The path to this attachment (ie c:/path/to/file.jpg).
private  java.net.URL url
          The HttpURI where the file can be got.
 
Constructor Summary
EmailAttachment()
           
 
Method Summary
 java.lang.String getDescription()
          Get the description.
 java.lang.String getDisposition()
          Get the disposition.
 java.lang.String getName()
          Get the name.
 java.lang.String getPath()
          Get the path.
 java.net.URL getURL()
          Get the URL.
 void setDescription(java.lang.String desc)
          Set the description.
 void setDisposition(java.lang.String aDisposition)
          Set the disposition.
 void setName(java.lang.String aName)
          Set the name.
 void setPath(java.lang.String aPath)
          Set the path to the attachment.
 void setURL(java.net.URL aUrl)
          Set the URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTACHMENT

public static final java.lang.String ATTACHMENT
Definition of the part being an attachment

See Also:
Constant Field Values

INLINE

public static final java.lang.String INLINE
Definition of the part being inline

See Also:
Constant Field Values

name

private java.lang.String name
The name of this attachment.


description

private java.lang.String description
The description of this attachment.


path

private java.lang.String path
The path to this attachment (ie c:/path/to/file.jpg).


url

private java.net.URL url
The HttpURI where the file can be got.


disposition

private java.lang.String disposition
The disposition.

Constructor Detail

EmailAttachment

public EmailAttachment()
Method Detail

getDescription

public java.lang.String getDescription()
Get the description.

Returns:
A String.
Since:
1.0

getName

public java.lang.String getName()
Get the name.

Returns:
A String.
Since:
1.0

getPath

public java.lang.String getPath()
Get the path.

Returns:
A String.
Since:
1.0

getURL

public java.net.URL getURL()
Get the URL.

Returns:
A URL.
Since:
1.0

getDisposition

public java.lang.String getDisposition()
Get the disposition.

Returns:
A String.
Since:
1.0

setDescription

public void setDescription(java.lang.String desc)
Set the description.

Parameters:
desc - A String.
Since:
1.0

setName

public void setName(java.lang.String aName)
Set the name.

Parameters:
aName - A String.
Since:
1.0

setPath

public void setPath(java.lang.String aPath)
Set the path to the attachment. The path can be absolute or relative and should include the filename.

Example: /home/user/images/image.jpg
Example: images/image.jpg

Parameters:
aPath - A String.
Since:
1.0

setURL

public void setURL(java.net.URL aUrl)
Set the URL.

Parameters:
aUrl - A URL.
Since:
1.0

setDisposition

public void setDisposition(java.lang.String aDisposition)
Set the disposition.

Parameters:
aDisposition - A String.
Since:
1.0