Class Message
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.email.Message
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a textual part of the messageReturns the charset of mail message.Returns the content typebooleanReturns true if the mimeType has been set.voidprint(PrintStream ps) Prints the message onto an output streamvoidsetCharset(String charset) Sets the character set of mail message.voidsetInputEncoding(String encoding) Sets the encoding to expect when reading the message from a file.voidsetMimeType(String mimeType) Sets the content type for the messagevoidSets the source file of the messageMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
- 
Constructor Details- 
Messagepublic Message()Creates a new empty message
- 
MessageCreates a new message based on the given string- Parameters:
- text- the message
 
- 
MessageCreates a new message using the contents of the given file.- Parameters:
- file- the source of the message
 
 
- 
- 
Method Details- 
addTextAdds a textual part of the message- Parameters:
- text- some text to add
 
- 
setSrcSets the source file of the message- Parameters:
- src- the source of the message
 
- 
setMimeTypeSets the content type for the message- Parameters:
- mimeType- a mime type e.g. "text/plain"
 
- 
getMimeType
- 
printPrints the message onto an output stream- Parameters:
- ps- The print stream to write to
- Throws:
- IOException- if an error occurs
 
- 
isMimeTypeSpecifiedpublic boolean isMimeTypeSpecified()Returns true if the mimeType has been set.- Returns:
- false if the default value is in use
 
- 
setCharsetSets the character set of mail message. Will be ignored if mimeType contains ....; Charset=... substring.- Parameters:
- charset- the character set name.
- Since:
- Ant 1.6
 
- 
getCharsetReturns the charset of mail message.- Returns:
- Charset of mail message.
- Since:
- Ant 1.6
 
- 
setInputEncodingSets the encoding to expect when reading the message from a file.Will be ignored if the message has been specified inline. - Parameters:
- encoding- the name of the charset used
- Since:
- Ant 1.9.4
 
 
-