|
31 | 31 | * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a> |
32 | 32 | * @author Apache Software Foundation |
33 | 33 | * @since 1.0-dev |
34 | | - * @version $Id: Base64.java,v 1.21 2004/10/20 01:37:54 ggregory Exp $ |
| 34 | + * @version $Id: Base64.java,v 1.22 2004/10/30 00:18:57 ggregory Exp $ |
35 | 35 | */ |
36 | 36 | public class Base64 implements BinaryEncoder, BinaryDecoder { |
37 | 37 |
|
@@ -92,9 +92,31 @@ public class Base64 implements BinaryEncoder, BinaryDecoder { |
92 | 92 | */ |
93 | 93 | static final byte PAD = (byte) '='; |
94 | 94 |
|
95 | | - // Create arrays to hold the base64 characters and a |
96 | | - // lookup for base64 chars |
| 95 | + /** |
| 96 | + * Contains the Base64 values <code>0</code> through <code>63</code> accessed by using character encodings as |
| 97 | + * indices. |
| 98 | + * <p> |
| 99 | + * For example, <code>base64Alphabet['+']</code> returns <code>62</code>. |
| 100 | + * </p> |
| 101 | + * <p> |
| 102 | + * The value of undefined encodings is <code>-1</code>. |
| 103 | + * </p> |
| 104 | + */ |
97 | 105 | private static byte[] base64Alphabet = new byte[BASELENGTH]; |
| 106 | + |
| 107 | + /** |
| 108 | + * <p> |
| 109 | + * Contains the Base64 encodings <code>A</code> through <code>Z</code>, followed by <code>a</code> through |
| 110 | + * <code>z</code>, followed by <code>0</code> through <code>9</code>, followed by <code>+</code>, and |
| 111 | + * <code>/</code>. |
| 112 | + * </p> |
| 113 | + * <p> |
| 114 | + * This array is accessed by using character values as indices. |
| 115 | + * </p> |
| 116 | + * <p> |
| 117 | + * For example, <code>lookUpBase64Alphabet[62] </code> returns <code>'+'</code>. |
| 118 | + * </p> |
| 119 | + */ |
98 | 120 | private static byte[] lookUpBase64Alphabet = new byte[LOOKUPLENGTH]; |
99 | 121 |
|
100 | 122 | // Populating the lookup and character arrays |
|
0 commit comments