B2G/gecko/dom/mobilemessage/src/ril/WspPduHelper.jsm
/**
   * @param data
   *        A wrapped object to store encoded raw data.
   * @param value
   *        A numeric value to be encoded.
   *
   * @throws CodeError if the octet read is larger-equal than 0x80.
   */
@param data
A wrapped object to store encoded raw data.
@param value
A numeric value to be encoded.

@throws CodeError if the octet read is larger-equal than 0x80.
@param data A wrapped object to store encoded raw data . @param value A numeric value to be encoded . @throws CodeError if the octet read is larger - equal than 0x80 .
function encode(data, value) {
    if (value >= 0x80) {
      throw new CodeError("Short-integer: invalid value " + value);
    }
    Octet.encode(data, value | 0x80);
  }
function encode ( data , value ) { if ( value >= 0x80 ) { throw new CodeError ( "Short-integer: invalid value " + value ) ; } Octet . encode ( data , value | 0x80 ) ; }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .