OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * As needed mock alternative to dart:io for environments |
| 7 * where dart:io is unavailable. |
| 8 */ |
| 9 class InputStream { |
| 10 int available() { |
| 11 throw new UnsupportedOperationException( |
| 12 "Method InputStream.available() not available"); |
| 13 } |
| 14 bool get closed() { |
| 15 throw new UnsupportedOperationException( |
| 16 "Method InputStream.closed() not available"); |
| 17 } |
| 18 List<int> read([int readSize]) { |
| 19 throw new UnsupportedOperationException( |
| 20 "Method InputStream.read() not available"); |
| 21 } |
| 22 void set onClosed(void callback()) { |
| 23 throw new UnsupportedOperationException( |
| 24 "Setter InputStream.onClosed() not available"); |
| 25 } |
| 26 void set onData(void callback()) { |
| 27 throw new UnsupportedOperationException( |
| 28 "Setter InputStream.onData not available"); |
| 29 } |
| 30 void set onError(void callback(Exception e)) { |
| 31 throw new UnsupportedOperationException( |
| 32 "Setter InputStream.onError not available"); |
| 33 } |
| 34 } |
OLD | NEW |