|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.mail.ByteArrayDataSource
This class implements a typed DataSource from:
- an InputStream
- a byte array
- a String
| Field Summary | |
static int |
BUFFER_SIZE
define the buffer size |
| Constructor Summary | |
ByteArrayDataSource(byte[] data,
java.lang.String aType)
Create a datasource from a byte array. |
|
ByteArrayDataSource(java.io.InputStream aIs,
java.lang.String aType)
Create a datasource from an input stream. |
|
ByteArrayDataSource(java.lang.String data,
java.lang.String aType)
Create a datasource from a String. |
|
| Method Summary | |
java.lang.String |
getContentType()
Get the content type. |
java.io.InputStream |
getInputStream()
Get the input stream. |
java.lang.String |
getName()
Get the name. |
java.io.OutputStream |
getOutputStream()
Get the OutputStream to write to |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int BUFFER_SIZE
| Constructor Detail |
public ByteArrayDataSource(byte[] data,
java.lang.String aType)
throws java.io.IOException
data - A byte[].aType - A String.
java.io.IOException - IOException
public ByteArrayDataSource(java.io.InputStream aIs,
java.lang.String aType)
throws java.io.IOException
aIs - An InputStream.aType - A String.
java.io.IOException - IOException
public ByteArrayDataSource(java.lang.String data,
java.lang.String aType)
throws java.io.IOException
data - A String.aType - A String.
java.io.IOException - IOException| Method Detail |
public java.lang.String getContentType()
getContentType in interface javax.activation.DataSource
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.activation.DataSourcejava.io.IOException - IOExceptionpublic java.lang.String getName()
getName in interface javax.activation.DataSourcepublic java.io.OutputStream getOutputStream()
getOutputStream in interface javax.activation.DataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||