public class MailMessageSource extends Object implements DataSource
DataSource implementation for use with the MailMessage utility class.| Constructor and Description |
|---|
MailMessageSource(InputStream is,
String contentType)
Constructor for the MailMessageSource object.
|
MailMessageSource(InputStream is,
String contentType,
String name)
Constructor for the MailMessageSource object
|
MailMessageSource(String data,
String contentType,
String charset)
Constructor for the MailSource object
|
MailMessageSource(String data,
String contentType,
String charset,
String name)
Constructor for the MailSource object
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream()
This method is unsupported.
|
public MailMessageSource(InputStream is, String contentType) throws IOException
is - the InputStream of the data sourcecontentType - the content type of the data source.IOException - if an error occurs reading the specified input stream.public MailMessageSource(InputStream is, String contentType, String name) throws IOException
is - the InputStream of the data sourcecontentType - the content type of the data source.name - the message source name.IOException - if an error occurs reading the specified input stream.public MailMessageSource(String data, String contentType, String charset) throws UnsupportedEncodingException
data - The content of the data sourcecontentType - The content type of the data sourcecharset - The character encoding of the data source.UnsupportedEncodingException - if the encoding isn't supported.public MailMessageSource(String data, String contentType, String charset, String name) throws UnsupportedEncodingException
data - the content of the data sourcecontentType - the content type of the data sourcecharset - the character encoding of the data source.name - The name of the message source.UnsupportedEncodingException - if the encoding isn't supported.public String getContentType()
getContentType in interface DataSourcepublic InputStream getInputStream() throws IOException
getInputStream in interface DataSourceIOExceptionpublic String getName()
getName in interface DataSourcepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface DataSourceIOException - Description of the Exception