public class GenericMessagePart extends java.lang.Object implements MMSMessagePart, java.io.Serializable
MMSMessage
.
The GenericMessagePart should not be used with a
SMILMessage
. Use a
SMILDocument
instead.
Constructor and Description |
---|
GenericMessagePart(java.lang.String contentType,
byte[] content)
Construct a generic message part.
|
GenericMessagePart(java.lang.String contentType,
java.io.File content)
Construct a generic message part by reading the specified input stream.
|
GenericMessagePart(java.lang.String contentType,
java.io.InputStream content)
Construct a generic message part by reading the specified input stream.
|
GenericMessagePart(java.lang.String contentType,
java.lang.String contentLocation,
byte[] content)
Construct a generic message part.
|
GenericMessagePart(java.lang.String contentType,
java.lang.String contentLocation,
java.io.InputStream content)
Construct a generic message part by reading the specified input stream.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCharset()
Get the character set of the content.
|
byte[] |
getContent()
Get the content data of this message part.
|
java.lang.String |
getContentID()
Get the Content-ID of this message part.
|
java.lang.String |
getContentLocation()
Get the content location of this message part.
|
java.lang.String |
getContentType()
Get the content-type of this message part.
|
java.lang.String |
getMimeType()
Get the mime-type of this message part.
|
void |
setCharset(java.lang.String charset)
Set the character set (encoding) that has been used for encoding the content.
|
void |
setContentID(java.lang.String id)
Set the Content-ID for this Message Part.
|
public GenericMessagePart(java.lang.String contentType, byte[] content)
contentType
- the type of the content (e.g. 'image/jpeg').content
- the content datapublic GenericMessagePart(java.lang.String contentType, java.io.File content) throws java.io.IOException
contentType
- the type of the content (e.g. "text/plain")content
- the File holding the contentjava.io.IOException
- if reading from the stream results in an errorpublic GenericMessagePart(java.lang.String contentType, java.io.InputStream content) throws java.io.IOException
contentType
- the type of the content (e.g. "text/plain")content
- the InputStream for reading the contentjava.io.IOException
- if reading from the stream results in an errorpublic GenericMessagePart(java.lang.String contentType, java.lang.String contentLocation, java.io.InputStream content) throws java.io.IOException
contentType
- the type of the content (e.g. "text/plain")contentLocation
- the content locationcontent
- the InputStream for reading the contentjava.io.IOException
- if reading from the stream results in an errorpublic GenericMessagePart(java.lang.String contentType, java.lang.String contentLocation, byte[] content)
contentType
- the type of the content (e.g. "text/plain")contentLocation
- the content locationcontent
- the contentpublic byte[] getContent()
MMSMessagePart
getContent
in interface MMSMessagePart
public java.lang.String getMimeType()
MMSMessagePart
getMimeType
in interface MMSMessagePart
public java.lang.String getContentLocation()
MMSMessagePart
SMIL document
refers to this location.getContentLocation
in interface MMSMessagePart
public void setCharset(java.lang.String charset)
MMSMessagePart
setCharset
in interface MMSMessagePart
charset
- the character set (e.g. "UTF-8").public java.lang.String getCharset()
MMSMessagePart
getCharset
in interface MMSMessagePart
public java.lang.String getContentType()
MMSMessagePart
getContentType
in interface MMSMessagePart
public void setContentID(java.lang.String id)
id
- the Content-IDpublic java.lang.String getContentID()
MMSMessagePart
getContentID
in interface MMSMessagePart
object XP, Inc. © 2000-2013. All rights reserved object XP