OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 dart.io; |
| 6 |
5 class _Base64 { | 7 class _Base64 { |
6 static const List<String> _encodingTable = const [ | 8 static const List<String> _encodingTable = const [ |
7 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', | 9 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', |
8 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', | 10 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', |
9 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', | 11 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', |
10 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', | 12 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', |
11 '8', '9', '+', '/']; | 13 '8', '9', '+', '/']; |
12 | 14 |
13 /** | 15 /** |
14 * Base64 transfer encoding for MIME (RFC 2045) | 16 * Base64 transfer encoding for MIME (RFC 2045) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 if (padCount == 0) { | 97 if (padCount == 0) { |
96 result.add(value & 0xFF); | 98 result.add(value & 0xFF); |
97 } | 99 } |
98 charCount = 0; | 100 charCount = 0; |
99 value = 0; | 101 value = 0; |
100 } | 102 } |
101 } | 103 } |
102 return result; | 104 return result; |
103 } | 105 } |
104 } | 106 } |
OLD | NEW |