Google is committed to advancing racial equity for Black communities. See how.

map method

Uint8List map ()

Maps the Vmo into the process's root vmar, and returns it as a typed data array.

The returned Uint8List is read-only. Attempts to write to it will result in an UnsupportedError exception.

Implementation

Uint8List map() {
  if (handle == null) {
    const int status = ZX.ERR_INVALID_ARGS;
    throw ZxStatusException(status, getStringForStatus(status));
  }
  MapResult r = System.vmoMap(handle);
  if (r.status != ZX.OK) {
    throw ZxStatusException(r.status, getStringForStatus(r.status));
  }
  return UnmodifiableUint8ListView(r.data);
}