|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.util.StringDataSource
public class StringDataSource
This class implements a data source for strings.
Constructor Summary | |
---|---|
StringDataSource(java.lang.String sData,
java.lang.String sAttachmentName)
Constructor. |
|
StringDataSource(java.lang.String sData,
java.lang.String sContentType,
java.lang.String sAttachmentName)
Constructor. |
|
StringDataSource(java.lang.String sData,
java.lang.String sContentType,
java.lang.String sCharacterEncoding,
java.lang.String sAttachmentName)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
Get the content-type of the data. |
java.io.InputStream |
getInputStream()
Get an input stream to the data. |
java.lang.String |
getName()
Get the name of the attachment. |
java.io.OutputStream |
getOutputStream()
Get an output stream to the data (not supported). |
void |
setContentType(java.lang.String sContentType)
Set the content-type of the data. |
void |
setName(java.lang.String sName)
Set the name of the attachment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringDataSource(java.lang.String sData, java.lang.String sAttachmentName)
text/plain
.
sData
- the stringsAttachmentName
- the attachment namepublic StringDataSource(java.lang.String sData, java.lang.String sContentType, java.lang.String sAttachmentName)
sData
- the stringsContentType
- the content-typesAttachmentName
- the attachment namepublic StringDataSource(java.lang.String sData, java.lang.String sContentType, java.lang.String sCharacterEncoding, java.lang.String sAttachmentName)
sData
- the stringsContentType
- the content-typesCharacterEncoding
- the character encodingsAttachmentName
- the attachment nameMethod Detail |
---|
public java.lang.String getContentType()
public void setContentType(java.lang.String sContentType)
sContentType
- the content-type of the datapublic java.lang.String getName()
public void setName(java.lang.String sName)
sName
- the name of the attachmentpublic java.io.InputStream getInputStream() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
- always thrown because operation not supported
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |