readString method

  1. @override
String readString([
  1. int? byteCount,
  2. Converter<List<int>, String> decoder = BinaryReader.utf8Decoder
])
inherited

Read byteCount bytes and decode an UTF-8 String.

If byteCount is not provided, it is read first.

Implementation

@override
String readString([
  int? byteCount,
  Converter<List<int>, String> decoder = BinaryReader.utf8Decoder,
]) {
  byteCount ??= readUint32();
  final view = viewBytes(byteCount);
  return decoder.convert(view);
}