B2G/gecko/dom/mobilemessage/src/ril/MmsPduHelper.jsm
/**
   * @param data
   *        A wrapped object containing raw PDU data.
   *
   * @return A decoded string.
   *
   * @throws NotWellKnownEncodingError if decoded well-known parameter number
   *         is not registered or supported.
   */
@param data
A wrapped object containing raw PDU data.

@return A decoded string.

@throws NotWellKnownEncodingError if decoded well-known parameter number
is not registered or supported.
@param data A wrapped object containing raw PDU data . @return A decoded string . @throws NotWellKnownEncodingError if decoded well - known parameter number is not registered or supported .
function decodeParameterName(data) {
    let begin = data.offset;
    let number;
    try {
      number = WSP.ShortInteger.decode(data);
    } catch (e) {
      data.offset = begin;
      return WSP.TextString.decode(data).toLowerCase();
    }
    let entry = MMS_WELL_KNOWN_PARAMS[number];
    if (!entry) {
      throw new WSP.NotWellKnownEncodingError(
        "Parameter-name: not well known parameter " + number);
    }
    return entry.name;
  }
function decodeParameterName ( data ) { let begin = data . offset ; let number ; try { number = WSP . ShortInteger . decode ( data ) ; } catch ( e ) { data . offset = begin ; return WSP . TextString . decode ( data ) . toLowerCase ( ) ; } let entry = MMS_WELL_KNOWN_PARAMS [ number ] ; if ( ! entry ) { throw new WSP . NotWellKnownEncodingError ( "Parameter-name: not well known parameter " + number ) ; } return entry . name ; }
@param data
        A wrapped object containing raw PDU data.
@param data A wrapped object containing raw PDU data .