B2G/gecko/dom/mobilemessage/src/ril/WspPduHelper.jsm
/**
   * @param data
   *        A wrapped object to store encoded raw data.
   * @param header
   *        An object containing two attributes: a string-typed `name` and a
   *        `value` of arbitrary type.
   *
   * @throws CodeError if got an empty header name.
   */
@param data
A wrapped object to store encoded raw data.
@param header
An object containing two attributes: a string-typed `name` and a
`value` of arbitrary type.

@throws CodeError if got an empty header name.
@param data A wrapped object to store encoded raw data . @param header An object containing two attributes : a string - typed ` name ` and a ` value ` of arbitrary type . @throws CodeError if got an empty header name .
function encode(data, header) {
    if (!header.name) {
      throw new CodeError("Application-header: empty header name");
    }
    TokenText.encode(data, header.name);
    TextString.encode(data, header.value);
  }
function encode ( data , header ) { if ( ! header . name ) { throw new CodeError ( "Application-header: empty header name" ) ; } TokenText . encode ( data , header . name ) ; TextString . encode ( data , header . value ) ; }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .