B2G/gecko/dom/mobilemessage/src/ril/MmsPduHelper.jsm
/**
   * @param data
   *        A wrapped object to store encoded raw data.
   * @param type
   *        A numeric message type value to be encoded.
   *
   * @throws CodeError if the value is not in the range 128..151.
   */
@param data
A wrapped object to store encoded raw data.
@param type
A numeric message type value to be encoded.

@throws CodeError if the value is not in the range 128..151.
@param data A wrapped object to store encoded raw data . @param type A numeric message type value to be encoded . @throws CodeError if the value is not in the range 128 .. 151 .
function encode(data, type) {
    if ((type < 128) || (type > 151)) {
      throw new WSP.CodeError("Message-type-value: invalid type " + type);
    }
    WSP.Octet.encode(data, type);
  }
function encode ( data , type ) { if ( ( type < 128 ) || ( type > 151 ) ) { throw new WSP . CodeError ( "Message-type-value: invalid type " + type ) ; } WSP . Octet . encode ( data , type ) ; }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .