| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart_io; | |
| 6 | |
| 7 class _FileInputStream extends _BaseDataInputStream implements InputStream { | 5 class _FileInputStream extends _BaseDataInputStream implements InputStream { |
| 8 _FileInputStream(String name) | 6 _FileInputStream(String name) |
| 9 : _data = const [], | 7 : _data = const [], |
| 10 _position = 0, | 8 _position = 0, |
| 11 _filePosition = 0 { | 9 _filePosition = 0 { |
| 12 var file = new File(name); | 10 var file = new File(name); |
| 13 var future = file.open(FileMode.READ); | 11 var future = file.open(FileMode.READ); |
| 14 future.handleException((e) { | 12 future.handleException((e) { |
| 15 _reportError(e); | 13 _reportError(e); |
| 16 return true; | 14 return true; |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 new FileIOException("File closed '$_name'")); | 1126 new FileIOException("File closed '$_name'")); |
| 1129 }); | 1127 }); |
| 1130 return completer.future; | 1128 return completer.future; |
| 1131 } | 1129 } |
| 1132 | 1130 |
| 1133 final String _name; | 1131 final String _name; |
| 1134 int _id; | 1132 int _id; |
| 1135 | 1133 |
| 1136 SendPort _fileService; | 1134 SendPort _fileService; |
| 1137 } | 1135 } |
| OLD | NEW |