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