|
Oracle Fusion Middleware Communication Services 11.1.1.3.0 Java API Reference E14785-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.sdp.parlayx.multimedia_messaging.ByteArrayDataSource
public class ByteArrayDataSource
Example:
Message message = MessageFactory.getInstance().createMessage(); byte[] myImageBytes; // Initialized image bytes ByteArrayDataSource imageSource = new ByteArrayDataSource(myImageBytes, "image/jpeg"); message.setDataHandler(new DataHandler(imageSource));
Constructor Summary | |
---|---|
ByteArrayDataSource(byte[] content,
java.lang.String contentType)
Create a ByteArrayDataSource using the provided byte content and contentType. |
|
ByteArrayDataSource(InputStream stream,
java.lang.String contentType)
Create a ByteArrayDataSource using the provided InputStream and contentType. |
Method Summary | |
---|---|
byte[] |
getBytes()
Get the content of this DataSource as a byte array. |
java.lang.String |
getContentType()
|
InputStream |
getInputStream()
|
java.lang.String |
getName()
|
OutputStream |
getOutputStream()
Get an OutputStream for this DataSource. |
void |
setName(java.lang.String name)
|
void |
writeTo(OutputStream os)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayDataSource(byte[] content, java.lang.String contentType)
content
- contentType
- public ByteArrayDataSource(InputStream stream, java.lang.String contentType) throws IOException
stream
- contentType
-
IOException
Method Detail |
---|
public byte[] getBytes()
public java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public InputStream getInputStream() throws IOException
getInputStream
in interface javax.activation.DataSource
IOException
public java.lang.String getName()
getName
in interface javax.activation.DataSource
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface javax.activation.DataSource
IOException
public void setName(java.lang.String name)
public void writeTo(OutputStream os) throws IOException
IOException
|
Oracle Fusion Middleware Communication Services 11.1.1.3.0 Java API Reference E14785-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |