B2G/gecko/dom/mobilemessage/src/ril/WspPduHelper.jsm
/**
   * @param data
   *        A wrapped object to store encoded raw data.
   * @param value
   */
@param data
A wrapped object to store encoded raw data.
@param value
@param data A wrapped object to store encoded raw data . @param value
function encode(data, value) {
    let begin = data.offset;
    try {
      AcceptCharsetValue.encodeAnyCharset(data, value);
      return;
    } catch (e) {}
    data.offset = begin;
    let entry = WSP_WELL_KNOWN_CHARSETS[value.charset.toLowerCase()];
    if (!entry) {
      throw new NotWellKnownEncodingError(
        "Well-known-charset: not well known charset " + value.charset);
    }
    IntegerValue.encode(data, entry.number);
  }
function encode ( data , value ) { let begin = data . offset ; try { AcceptCharsetValue . encodeAnyCharset ( data , value ) ; return ; } catch ( e ) { } data . offset = begin ; let entry = WSP_WELL_KNOWN_CHARSETS [ value . charset . toLowerCase ( ) ] ; if ( ! entry ) { throw new NotWellKnownEncodingError ( "Well-known-charset: not well known charset " + value . charset ) ; } IntegerValue . encode ( data , entry . number ) ; }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .