FileDocCategorySizeDatePackage
GenericPdu.javaAPI DocAndroid 5.1 API3028Thu Mar 12 22:22:54 GMT 2015com.google.android.mms.pdu

GenericPdu

public class GenericPdu extends Object

Fields Summary
PduHeaders
mPduHeaders
The headers of pdu.
Constructors Summary
public GenericPdu()
Constructor.


          
      
        mPduHeaders = new PduHeaders();
    
GenericPdu(PduHeaders headers)
Constructor.

param
headers Headers for this PDU.

        mPduHeaders = headers;
    
Methods Summary
public EncodedStringValuegetFrom()
Get From value. From-value = Value-length (Address-present-token Encoded-string-value | Insert-address-token)

return
the value

       return mPduHeaders.getEncodedStringValue(PduHeaders.FROM);
    
public intgetMessageType()
Get X-Mms-Message-Type field value.

return
the X-Mms-Report-Allowed value

        return mPduHeaders.getOctet(PduHeaders.MESSAGE_TYPE);
    
public intgetMmsVersion()
Get X-Mms-MMS-Version field value.

return
the X-Mms-MMS-Version value

        return mPduHeaders.getOctet(PduHeaders.MMS_VERSION);
    
PduHeadersgetPduHeaders()
Get the headers of this PDU.

return
A PduHeaders of this PDU.

        return mPduHeaders;
    
public voidsetFrom(EncodedStringValue value)
Set From value.

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

        mPduHeaders.setEncodedStringValue(value, PduHeaders.FROM);
    
public voidsetMessageType(int value)
Set X-Mms-Message-Type field value.

param
value the value
throws
InvalidHeaderValueException if the value is invalid. RuntimeException if field's value is not Octet.

        mPduHeaders.setOctet(value, PduHeaders.MESSAGE_TYPE);
    
public voidsetMmsVersion(int value)
Set X-Mms-MMS-Version field value.

param
value the value
throws
InvalidHeaderValueException if the value is invalid. RuntimeException if field's value is not Octet.

        mPduHeaders.setOctet(value, PduHeaders.MMS_VERSION);