|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.james.transport.mailets.listservcommands.MailDataSource
public class MailDataSource
MailDataSource implements a typed DataSource from :
an InputStream, a byte array, and a string
This is used from BaseCommand.generateMail(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
Field Summary | |
---|---|
protected java.lang.String |
contentType
|
protected byte[] |
data
|
protected static int |
DEFAULT_BUF_SIZE
|
protected static java.lang.String |
DEFAULT_ENCODING
|
protected static java.lang.String |
DEFAULT_NAME
|
Constructor Summary | |
---|---|
MailDataSource(byte[] data,
java.lang.String contentType)
Create a datasource from a byte array |
|
MailDataSource(java.io.InputStream inputStream,
java.lang.String contentType)
Create a datasource from an input stream |
|
MailDataSource(java.lang.String data,
java.lang.String contentType)
Create a datasource from a String |
Method Summary | |
---|---|
protected static int |
copyStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
|
java.lang.String |
getContentType()
returns the contentType for this data source |
java.io.InputStream |
getInputStream()
returns the inputStream |
java.lang.String |
getName()
returns a static moniker |
java.io.OutputStream |
getOutputStream()
Not implemented |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int DEFAULT_BUF_SIZE
protected static final java.lang.String DEFAULT_ENCODING
protected static final java.lang.String DEFAULT_NAME
protected byte[] data
protected java.lang.String contentType
Constructor Detail |
---|
public MailDataSource(java.io.InputStream inputStream, java.lang.String contentType) throws java.io.IOException
java.io.IOException
public MailDataSource(byte[] data, java.lang.String contentType)
public MailDataSource(java.lang.String data, java.lang.String contentType) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
Method Detail |
---|
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.activation.DataSource
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface javax.activation.DataSource
java.io.IOException
public java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public java.lang.String getName()
getName
in interface javax.activation.DataSource
protected static int copyStream(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |