org.apache.tools.ant.taskdefs.email
Class Message
Class representing an email message.
- Ant 1.5
Message()- Creates a new empty message
|
Message(File file)- Creates a new message using the contents of the given file.
|
Message(String text)- Creates a new message based on the given string
|
void | addText(String text)- Adds a textual part of the message
|
String | getCharset()- Returns the charset of mail message.
|
String | getMimeType()- Returns the content type
|
boolean | isMimeTypeSpecified()- Returns true if the mimeType has been set.
|
void | print(PrintStream ps)- Prints the message onto an output stream
|
void | setCharset(String charset)- Sets the character set of mail message.
|
void | setMimeType(String mimeType)- Sets the content type for the message
|
void | setSrc(File src)- Sets the source file of the message
|
Message
public Message()
Creates a new empty message
Message
public Message(File file)
Creates a new message using the contents of the given file.
file - the source of the message
Message
public Message(String text)
Creates a new message based on the given string
text - the message
addText
public void addText(String text)
Adds a textual part of the message
text - some text to add
getCharset
public String getCharset()
Returns the charset of mail message.
- Charset of mail message.
- Ant 1.6
getMimeType
public String getMimeType()
Returns the content type
- the mime type
isMimeTypeSpecified
public boolean isMimeTypeSpecified()
Returns true if the mimeType has been set.
- false if the default value is in use
print
public void print(PrintStream ps)
throws IOException Prints the message onto an output stream
ps - The print stream to write to
setCharset
public void setCharset(String charset)
Sets the character set of mail message.
Will be ignored if mimeType contains ....; Charset=... substring.
- Ant 1.6
setMimeType
public void setMimeType(String mimeType)
Sets the content type for the message
mimeType - a mime type e.g. "text/plain"
setSrc
public void setSrc(File src)
Sets the source file of the message
src - the source of the message
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.