|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jmmslib.MmsPart
public class MmsPart
Defines a part of the MMS message.
Actually part can contain only text and images.
Here a brief example on how to use the class.
MmsMessage mms = new MmsMessage(); //fill the fields... MmsPart p = new MmsPart(); p.setPartContent(new String("Hello World").getBytes("US-ASCII")); p.setPartContentType(MmsMessage.CTYPE_TEXT_PLAIN); mms.addPart(p);
Constructor Summary | |
---|---|
MmsPart()
Creates an MmsPart object |
Method Summary | |
---|---|
java.lang.String |
getPartCharset()
Returns the charset for the content. |
byte[] |
getPartContent()
Returns the buffer containing the part data. |
java.lang.String |
getPartContentType()
Returns the part content type. |
java.lang.String |
getPartId()
Returns the part identifier. |
void |
setPartCharset(java.lang.String charset)
Sets the charset for the content. |
void |
setPartContent(byte[] buffer)
Sets the part data. |
void |
setPartContent(java.io.File f)
Sets the part data from a file. |
void |
setPartContent(java.lang.String filePath)
Sets the part data from a file name. |
void |
setPartContentType(java.lang.String contentType)
Sets the part content type. |
void |
setPartId(java.lang.String id)
Sets the part identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MmsPart()
Method Detail |
---|
public void setPartId(java.lang.String id)
id
- part identifierpublic void setPartContent(byte[] buffer)
buffer
- part data bufferpublic void setPartContent(java.io.File f) throws java.io.FileNotFoundException, MmsContentException
f
- part data file
java.io.FileNotFoundException
MmsContentException
- part data too bigpublic void setPartContent(java.lang.String filePath) throws java.io.FileNotFoundException, MmsContentException
filePath
- path of the part data file
java.io.FileNotFoundException
MmsContentException
public void setPartContentType(java.lang.String contentType)
contentType
- part content typepublic java.lang.String getPartId()
public byte[] getPartContent()
public java.lang.String getPartContentType()
public java.lang.String getPartCharset()
public void setPartCharset(java.lang.String charset)
charset
- charset
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |