decodeStream method

Future<String> decodeStream (Stream<List<int>> byteStream)

Implementation

Future<String> decodeStream(Stream<List<int>> byteStream) {
  return byteStream
      .transform(decoder)
      .fold(new StringBuffer(), (buffer, string) => buffer..write(string))
      .then((buffer) => buffer.toString());
}