jspos
Version:
JavaScript ISO8583 ,JavaScript version of JPOS
61 lines (48 loc) • 1.92 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @author Sean sean.snow@live.com
* @date 2015/12/24
*/
var Prefixer = function () {
function Prefixer() {
_classCallCheck(this, Prefixer);
}
_createClass(Prefixer, [{
key: "encodeLength",
/**
* Fills a byte array with the field length data in raw form.
*
* @param length
* The length to be encoded.
* @param b
* The byte array to fill with the encoded length.
*/
value: function encodeLength(length, b) {}
/**
* Decodes an encoded length.
*
* @param b
* The byte array to scan for the length.
* @param offset
* The offset to start scanning from.
* @return The length in chars of the field data to follow this
* LengthPrefix.
*/
}, {
key: "decodeLength",
value: function decodeLength(b, offset) {}
/**
* Returns the number of bytes taken up by the length encoding.
*/
}, {
key: "getPackedLength",
value: function getPackedLength() {}
}]);
return Prefixer;
}();
exports.default = Prefixer;
;