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

Unified Diff: sdk/lib/convert/base64.dart

Issue 1827803002: Make convert library strong-mode compliant. Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix more converters. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/convert/ascii.dart ('k') | sdk/lib/convert/chunked_conversion.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/base64.dart
diff --git a/sdk/lib/convert/base64.dart b/sdk/lib/convert/base64.dart
index eb7519a2710175d9ace3aaaea344e44d9a498f8d..cd1f90a154f4125beebc5865d567bdea83c19b8b 100644
--- a/sdk/lib/convert/base64.dart
+++ b/sdk/lib/convert/base64.dart
@@ -53,7 +53,9 @@ class Base64Codec extends Codec<List<int>, String> {
* Encodes lists of bytes using base64 encoding.
* The result are ASCII strings using a restricted alphabet.
*/
-class Base64Encoder extends Converter<List<int>, String> {
+class Base64Encoder extends
+ ChunkedConverter<List<int>, String, List<int>, String> {
+
const Base64Encoder();
String convert(List<int> input) {
@@ -69,13 +71,6 @@ class Base64Encoder extends Converter<List<int>, String> {
}
return new _AsciiBase64EncoderSink(sink);
}
-
- Stream<String> bind(Stream<List<int>> stream) {
- return new Stream<String>.eventTransformed(
- stream,
- (EventSink sink) =>
- new _ConverterStreamEventSink<List<int>, String>(this, sink));
- }
}
/**
@@ -304,7 +299,9 @@ class _Utf8Base64EncoderSink extends _Base64EncoderSink {
// Decoder
// ------------------------------------------------------------------------
-class Base64Decoder extends Converter<String, List<int>> {
+class Base64Decoder extends
+ ChunkedConverter<String, List<int>, String, List<int>> {
+
const Base64Decoder();
List<int> convert(String input, [int start = 0, int end]) {
« no previous file with comments | « sdk/lib/convert/ascii.dart ('k') | sdk/lib/convert/chunked_conversion.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698