| OLD | NEW |
| 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 part of "convert.dart"; | 5 part of "dart:convert"; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A [base64](https://tools.ietf.org/html/rfc4648) encoder and decoder. | 8 * A [base64](https://tools.ietf.org/html/rfc4648) encoder and decoder. |
| 9 * | 9 * |
| 10 * It encodes using the default base64 alphabet, | 10 * It encodes using the default base64 alphabet, |
| 11 * decodes using both the base64 and base64url alphabets, | 11 * decodes using both the base64 and base64url alphabets, |
| 12 * does not allow invalid characters and requires padding. | 12 * does not allow invalid characters and requires padding. |
| 13 * | 13 * |
| 14 * Examples: | 14 * Examples: |
| 15 * | 15 * |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 end = RangeError.checkValidRange(start, end, string.length); | 862 end = RangeError.checkValidRange(start, end, string.length); |
| 863 if (start == end) return; | 863 if (start == end) return; |
| 864 Uint8List buffer = _decoder.decode(string, start, end); | 864 Uint8List buffer = _decoder.decode(string, start, end); |
| 865 if (buffer != null) _sink.add(buffer); | 865 if (buffer != null) _sink.add(buffer); |
| 866 if (isLast) { | 866 if (isLast) { |
| 867 _decoder.close(string, end); | 867 _decoder.close(string, end); |
| 868 _sink.close(); | 868 _sink.close(); |
| 869 } | 869 } |
| 870 } | 870 } |
| 871 } | 871 } |
| OLD | NEW |