|
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.StringDataSource
public class StringDataSource
Examples:
Message message = MessageFactory.getInstance().createMessage(); StringDataSource plainDataSource = new StringDataSource("This is a Plain Text message.", "text/plain"); message.setDataHandler(new DataHandler(plainDataSource));
Message message = MessageFactory.getInstance().createMessage(); StringDataSource htmlDataSource = new StringDataSource("<html><head></head><body><b><i>This is an HTML part with a UTF-8 character: ?.</i></b></body></html>", "text/html; charset=UTF-8"); message.setDataHandler(new DataHandler(htmlDataSource));
Constructor Summary | |
---|---|
StringDataSource(byte[] bytes,
java.lang.String contentType)
Create a StringDataSource using the provided byte array. |
|
StringDataSource(InputStream stream,
java.lang.String contentType)
Create a StringDataSource using the provided InputStream. |
|
StringDataSource(java.lang.String content,
java.lang.String contentType)
Create a StringDataSource with the provided String content and contentType. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
|
InputStream |
getInputStream()
Get an InputStream containing the data for this DataSource. |
java.lang.String |
getName()
|
OutputStream |
getOutputStream()
Get an OutputStream for this DataSource. |
java.lang.String |
getString()
Get the content of this DataSource as a String. |
void |
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringDataSource(byte[] bytes, java.lang.String contentType)
bytes
- contentType
- public StringDataSource(InputStream stream, java.lang.String contentType)
stream
- contentType
- public StringDataSource(java.lang.String content, java.lang.String contentType)
content
- contentType
- Method Detail |
---|
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 java.lang.String getString()
public void setName(java.lang.String name)
|
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 |