FileDocCategorySizeDatePackage
MultimediaMessagePdu.javaAPI DocAndroid 1.5 API3469Wed May 06 22:41:56 BST 2009com.google.android.mms.pdu

MultimediaMessagePdu

public class MultimediaMessagePdu extends GenericPdu
Multimedia message PDU.

Fields Summary
private PduBody
mMessageBody
The body.
Constructors Summary
public MultimediaMessagePdu()
Constructor.

        super();
    
public MultimediaMessagePdu(PduHeaders header, PduBody body)
Constructor.

param
header the header of this PDU
param
body the body of this PDU

        super(header);
        mMessageBody = body;
    
MultimediaMessagePdu(PduHeaders headers)
Constructor with given headers.

param
headers Headers for this PDU.

        super(headers);
    
Methods Summary
public voidaddTo(EncodedStringValue value)
Add a "To" value.

param
value the value
throws
NullPointerException if the value is null.

        mPduHeaders.appendEncodedStringValue(value, PduHeaders.TO);
    
public PduBodygetBody()
Get body of the PDU.

return
the body

        return mMessageBody;
    
public longgetDate()
Get Date value.

return
the value

        return mPduHeaders.getLongInteger(PduHeaders.DATE);
    
public intgetPriority()
Get X-Mms-Priority value.

return
the value

        return mPduHeaders.getOctet(PduHeaders.PRIORITY);
    
public EncodedStringValuegetSubject()
Get subject.

return
the value

        return mPduHeaders.getEncodedStringValue(PduHeaders.SUBJECT);
    
public EncodedStringValue[]getTo()
Get To value.

return
the value

        return mPduHeaders.getEncodedStringValues(PduHeaders.TO);
    
public voidsetBody(PduBody body)
Set body of the PDU.

param
body the body

        mMessageBody = body;
    
public voidsetDate(long value)
Set Date value in seconds.

param
value the value

        mPduHeaders.setLongInteger(value, PduHeaders.DATE);
    
public voidsetPriority(int value)
Set X-Mms-Priority value.

param
value the value
throws
InvalidHeaderValueException if the value is invalid.

        mPduHeaders.setOctet(value, PduHeaders.PRIORITY);
    
public voidsetSubject(EncodedStringValue value)
Set subject.

param
value the value
throws
NullPointerException if the value is null.

        mPduHeaders.setEncodedStringValue(value, PduHeaders.SUBJECT);