| // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| import 'dart:io' show BytesBuilder; |
| |
| // TODO(ahe): https://github.com/dart-lang/sdk/issues/28316 |
| class BytesSink implements Sink<List<int>> { |
| final BytesBuilder builder = new BytesBuilder(); |
| |
| @override |
| void add(List<int> data) { |
| builder.add(data); |
| } |
| |
| @override |
| void close() { |
| // Nothing to do. |
| } |
| } |