@@ -7,9 +7,9 @@ part of dart.io;
77// Read the file in blocks of size 64k.
88const int _blockSize = 64 * 1024 ;
99
10- class _FileStream extends Stream <List < int > > {
10+ class _FileStream extends Stream <Uint8List > {
1111 // Stream controller.
12- StreamController <List < int > > _controller;
12+ StreamController <Uint8List > _controller;
1313
1414 // Information about the underlying file.
1515 String _path;
@@ -33,15 +33,15 @@ class _FileStream extends Stream<List<int>> {
3333
3434 _FileStream .forStdin () : _position = 0 ;
3535
36- StreamSubscription <List < int >> listen (void onData (List < int > event),
36+ StreamSubscription <Uint8List > listen (void onData (Uint8List event),
3737 {Function onError, void onDone (), bool cancelOnError}) {
3838 _setupController ();
3939 return _controller.stream.listen (onData,
4040 onError: onError, onDone: onDone, cancelOnError: cancelOnError);
4141 }
4242
4343 void _setupController () {
44- _controller = new StreamController <List < int > >(
44+ _controller = new StreamController <Uint8List >(
4545 sync : true ,
4646 onListen: _start,
4747 onResume: _readBlock,
@@ -498,7 +498,7 @@ class _File extends FileSystemEntity implements File {
498498 return new _RandomAccessFile (id, "" );
499499 }
500500
501- Stream <List < int > > openRead ([int start, int end]) {
501+ Stream <Uint8List > openRead ([int start, int end]) {
502502 return new _FileStream (path, start, end);
503503 }
504504
0 commit comments