Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: lib/src/base64/decoder_sink.dart

Issue 1826543003: Update deprecations. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/base64/decoder.dart ('k') | lib/src/base64/encoder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'decoder.dart'; 7 import 'decoder.dart';
8 8
9 /// A [ChunkedConversionSink] for decoding chunks of Base64 strings to data. 9 /// This is deprecated.
10 ///
11 /// Use the `Base64Decoder` class in `dart:convert` instead.
12 @Deprecated("Will be removed in crypto 1.0.0.")
10 class Base64DecoderSink extends ChunkedConversionSink<String> { 13 class Base64DecoderSink extends ChunkedConversionSink<String> {
11 /// The encoder used to decode each chunk. 14 /// The encoder used to decode each chunk.
12 final Base64Decoder _decoder = new Base64Decoder(); 15 final Base64Decoder _decoder = new Base64Decoder();
13 16
14 /// The underlying sink to which to emit the decoded strings. 17 /// The underlying sink to which to emit the decoded strings.
15 final ChunkedConversionSink<List<int>> _outSink; 18 final ChunkedConversionSink<List<int>> _outSink;
16 19
17 /// The as-yet-unconverted text. 20 /// The as-yet-unconverted text.
18 /// 21 ///
19 /// This is used to handle text stopping partway through a four-character 22 /// This is used to handle text stopping partway through a four-character
(...skipping 20 matching lines...) Expand all
40 if (decodableLength > 0) { 43 if (decodableLength > 0) {
41 _outSink.add(_decoder.convert(chunk.substring(0, decodableLength))); 44 _outSink.add(_decoder.convert(chunk.substring(0, decodableLength)));
42 } 45 }
43 } 46 }
44 47
45 void close() { 48 void close() {
46 if (_unconverted.isNotEmpty) _outSink.add(_decoder.convert(_unconverted)); 49 if (_unconverted.isNotEmpty) _outSink.add(_decoder.convert(_unconverted));
47 _outSink.close(); 50 _outSink.close();
48 } 51 }
49 } 52 }
OLDNEW
« no previous file with comments | « lib/src/base64/decoder.dart ('k') | lib/src/base64/encoder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698