SizedVmo.fromUint8List constructor

SizedVmo.fromUint8List(Uint8List bytes)

Implementation

factory SizedVmo.fromUint8List(Uint8List bytes) {
  HandleResult r = System.vmoCreate(bytes.length);
  if (r.status != ZX.OK) {
    throw ZxStatusException(r.status, getStringForStatus(r.status));
  }
  return SizedVmo(r.handle, bytes.length)..write(bytes.buffer.asByteData());
}