FileDocCategorySizeDatePackage
ShortMessage.javaAPI DocWireless Messaging API2063Mon Nov 10 21:05:12 GMT 2003wmafw

ShortMessage

public class ShortMessage extends Object
Represents a short message, text and binary.

Fields Summary
protected String
id
protected String
from
protected String
text
protected byte[]
data
Constructors Summary
public ShortMessage(String from, String text, byte[] data)
Constructor. Creates an Email Message.

param
from is the message sender.
param
text is the text message.
param
data is the binary message.

        this.from = from;
        this.text = text;
        this.data = data;
        //  Calculate unique ID
        Calendar cal = Calendar.getInstance();
        Date date = cal.getTime();
        id = from+date.getTime();
    
Methods Summary
public byte[]getMessageData()
Returns the binary part of this message, if one.

return
the binary message.

        return data;
    
public java.lang.StringgetMessageText()
Returns the text part of this message, if one.

return
the text message.

        return text;