|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.util.mail.ByteArrayDataSource
public class ByteArrayDataSource
Implement DataSource interface for an array of bytes so that we can use this to set the data in a MimeBodyPart.
Constructor Summary | |
---|---|
ByteArrayDataSource(byte[] data,
String mimeType)
Create the DataSource. |
Method Summary | |
---|---|
String |
getContentType()
Return the content type of this data. |
InputStream |
getInputStream()
Return an InputStream for the data. |
String |
getName()
Return empty string. |
OutputStream |
getOutputStream()
Return an OutputStream for the data to be written. |
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 mimeType)
data
- The data (duh)mimeType
- The mime type of the data (text/html, application/octet-stream, etc.)Method Detail |
---|
public InputStream getInputStream() throws IOException
getInputStream
in interface javax.activation.DataSource
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface javax.activation.DataSource
IOException
public String getContentType()
getContentType
in interface javax.activation.DataSource
public String getName()
getName
in interface javax.activation.DataSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |