|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.misc.ByteArrayDataSource
Used to create a generic raw virtual DataSource for the MIME mail messages.
| Constructor Summary | |
ByteArrayDataSource(byte[] data,
String type,
String name)
Create a DataSource from raw data bytes |
|
ByteArrayDataSource(String text,
String type,
String name)
Create a DataSource from a text String |
|
| Method Summary | |
String |
getContentType()
Returns the content type (mime type) |
InputStream |
getInputStream()
Returns the input stream associated with the data source |
String |
getName()
Returns the name of the data source. |
OutputStream |
getOutputStream()
Returns the output stream associated with the data source |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ByteArrayDataSource(byte[] data,
String type,
String name)
data - is the contents of the mail messagetype - is the mime-type such as text/htmlname - the name of the attachment (ie a filename)
public ByteArrayDataSource(String text,
String type,
String name)
type - is the mime-type such as text/htmlname - the name of the attachment (ie a filename)| Method Detail |
public InputStream getInputStream()
throws IOException
getInputStream in interface javax.activation.DataSourceIOException - if there is I/O error
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface javax.activation.DataSourceIOException - always raised because by definition a data source is not a data sink!public String getContentType()
getContentType in interface javax.activation.DataSourcepublic String getName()
getName in interface javax.activation.DataSource
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||