Future<void> writeByteData(ByteData data) async{ final buffer = data.buffer; await this.writeAsBytes(buffer.asUint8List(data.offsetInBytes, data.lengthInBytes)); }