Make ForwardingFile.openRead return Stream<List<int>> again (#168)
`ForwardingFile.openRead` was changed to return a `Stream<Uint8List>`
instead of a `Stream<List<int>>` in preparation for making a
corresponding change to `dart:io`. However, that `dart:io` change
caused more breakage than expected and was reverted without making
corresponding reverts to `package:file`. I don't think that it makes
sense for `ForwardingFile` to return something different than its
delegate.
Without this change, the following code will fail with `package:file`
but not with `dart:io`:
```dart
await someFile.openRead().transform(utf8.decoder);
```
and unintuitively requires adding `.cast<List<int>>()` before
the transformation.
Bonus cleanup: since dart:io's `File.readAsBytes`/`readAsBytesSync`
are declared to return `Uint8List`, `ForwardingFile` should no longer
need to make explicit `Uint8List` copies.
3 files changed