|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.mail.ByteArrayDataSource
public class 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,
String aType)
Create a datasource from a byte array. |
|
ByteArrayDataSource(InputStream aIs,
String aType)
Create a datasource from an input stream. |
|
ByteArrayDataSource(String data,
String aType)
Create a datasource from a String. |
|
| Method Summary | |
|---|---|
String |
getContentType()
Get the content type. |
InputStream |
getInputStream()
Get the input stream. |
String |
getName()
Get the name. |
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,
String aType)
throws IOException
data - A byte[].aType - A String.
IOException - IOException
public ByteArrayDataSource(InputStream aIs,
String aType)
throws IOException
aIs - An InputStream.aType - A String.
IOException - IOException
public ByteArrayDataSource(String data,
String aType)
throws IOException
data - A String.aType - A String.
IOException - IOException| Method Detail |
|---|
public String getContentType()
getContentType in interface DataSource
public InputStream getInputStream()
throws IOException
getInputStream in interface DataSourceIOException - IOExceptionpublic String getName()
getName in interface DataSourcepublic OutputStream getOutputStream()
getOutputStream in interface DataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||