| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library barback.asset; | 5 library barback.asset.asset; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 | 10 |
| 11 import 'asset_id.dart'; | 11 import 'asset_id.dart'; |
| 12 import 'internal_asset.dart'; | 12 import 'internal_asset.dart'; |
| 13 | 13 |
| 14 /// A blob of content. | 14 /// A blob of content. |
| 15 /// | 15 /// |
| (...skipping 25 matching lines...) Expand all Loading... |
| 41 /// If the asset was created from a [String] the original string is always | 41 /// If the asset was created from a [String] the original string is always |
| 42 /// returned and [encoding] is ignored. Otherwise, the binary data of the | 42 /// returned and [encoding] is ignored. Otherwise, the binary data of the |
| 43 /// asset is decoded using [encoding], which defaults to [UTF8]. | 43 /// asset is decoded using [encoding], which defaults to [UTF8]. |
| 44 Future<String> readAsString({Encoding encoding}); | 44 Future<String> readAsString({Encoding encoding}); |
| 45 | 45 |
| 46 /// Streams the binary contents of the asset. | 46 /// Streams the binary contents of the asset. |
| 47 /// | 47 /// |
| 48 /// If the asset was created from a [String], this returns its UTF-8 encoding. | 48 /// If the asset was created from a [String], this returns its UTF-8 encoding. |
| 49 Stream<List<int>> read(); | 49 Stream<List<int>> read(); |
| 50 } | 50 } |
| OLD | NEW |