| OLD | NEW |
| 1 /// This library adds `dart:io` support to the HTML5 parser. Call | 1 /// This library adds `dart:io` support to the HTML5 parser. Call |
| 2 /// [initDartIOSupport] before calling the [parse] methods and they will accept | 2 /// [initDartIOSupport] before calling the [parse] methods and they will accept |
| 3 /// a [RandomAccessFile] as input, in addition to the other input types. | 3 /// a [RandomAccessFile] as input, in addition to the other input types. |
| 4 library parser_console; | 4 library parser_console; |
| 5 | 5 |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 import 'parser.dart'; | 7 import 'parser.dart'; |
| 8 import 'src/inputstream.dart' as inputstream; | 8 import 'src/inputstream.dart' as inputstream; |
| 9 | 9 |
| 10 /// Adds support to the [HtmlParser] for running on a console VM. In particular | 10 /// Adds support to the [HtmlParser] for running on a console VM. In particular |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 if (read <= 0) { | 33 if (read <= 0) { |
| 34 // This could happen if, for example, the file was resized while | 34 // This could happen if, for example, the file was resized while |
| 35 // we're reading. Just shrink the bytes array and move on. | 35 // we're reading. Just shrink the bytes array and move on. |
| 36 bytes = bytes.sublist(0, bytesRead); | 36 bytes = bytes.sublist(0, bytesRead); |
| 37 break; | 37 break; |
| 38 } | 38 } |
| 39 bytesRead += read; | 39 bytesRead += read; |
| 40 } | 40 } |
| 41 return bytes; | 41 return bytes; |
| 42 } | 42 } |
| OLD | NEW |