| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /** | 5 /** |
| 6 * Input streams are used to read data sequentially from some data | 6 * Input streams are used to read data sequentially from some data |
| 7 * source. All input streams are non-blocking. They each have a number | 7 * source. All input streams are non-blocking. They each have a number |
| 8 * of read calls which will always return without any IO related | 8 * of read calls which will always return without any IO related |
| 9 * blocking. If the requested data is not available a read call will | 9 * blocking. If the requested data is not available a read call will |
| 10 * return [:null:]. All input streams have one or more handlers which | 10 * return [:null:]. All input streams have one or more handlers which |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 /** | 206 /** |
| 207 * Sets the handler that gets called when the underlying | 207 * Sets the handler that gets called when the underlying |
| 208 * communication channel gets into some kind of error situation. | 208 * communication channel gets into some kind of error situation. |
| 209 */ | 209 */ |
| 210 void set errorHandler(void callback()); | 210 void set errorHandler(void callback()); |
| 211 } | 211 } |
| 212 | 212 |
| 213 | 213 |
| 214 class StreamException implements Exception { | 214 class StreamException implements Exception { |
| 215 const StreamException([String this.message = ""]); | 215 const StreamException([String this.message = ""]); |
| 216 const StreamException.streamClosed() : message = "Stream closed"; |
| 216 String toString() => "StreamException: $message"; | 217 String toString() => "StreamException: $message"; |
| 217 final String message; | 218 final String message; |
| 218 } | 219 } |
| OLD | NEW |