Exemple #1
0
function readInto(buffer, offset, length, callback) {
  typ.assertBuffer(buffer);

  if (typ.isUndefined(offset)) {
    offset = 0;
  } else {
    typ.assertUInt(offset);
  }

  if (typ.isDefined(length)) {
    typ.assertUInt(length);
  }

  typ.assertFunction(callback);

  sealer.unseal(this.slicer).read(buffer, offset, length, callback);
}
Exemple #2
0
Slicer.prototype.readAll = function readAll(callback) {
  typ.assertFunction(callback);
  sealer.unseal(this.slicer).read(undefined, 0, undefined, callback);
}
Exemple #3
0
Slicer.prototype.read = function read(length, callback) {
  typ.assertUInt(length);
  typ.assertFunction(callback);
  sealer.unseal(this.slicer).read(undefined, 0, length, callback);
}