|
35 | 35 | * The class can be parameterized in the following manner with various constructors: |
36 | 36 | * <ul> |
37 | 37 | * <li>URL-safe mode: Default off.</li> |
38 | | - * <li>Line length: Default 76. Line length that aren't multiples of 4 will still essentially end up being multiples of 4 in the |
39 | | - * encoded data. |
| 38 | + * <li>Line length: Default 76. Line length that aren't multiples of 4 will still essentially end up being multiples of |
| 39 | + * 4 in the encoded data. |
40 | 40 | * <li>Line separator: Default is CRLF ("\r\n")</li> |
41 | 41 | * </ul> |
42 | 42 | * </p> |
@@ -75,11 +75,10 @@ public class Base64 implements BinaryEncoder, BinaryDecoder { |
75 | 75 | static final byte[] CHUNK_SEPARATOR = {'\r', '\n'}; |
76 | 76 |
|
77 | 77 | /** |
78 | | - * This array is a lookup table that translates 6-bit positive integer |
79 | | - * index values into their "Base64 Alphabet" equivalents as specified |
80 | | - * in Table 1 of RFC 2045. |
81 | | - * |
82 | | - * Thanks to "commons" project in ws.apache.org for this code. |
| 78 | + * This array is a lookup table that translates 6-bit positive integer index values into their "Base64 Alphabet" |
| 79 | + * equivalents as specified in Table 1 of RFC 2045. |
| 80 | + * |
| 81 | + * Thanks to "commons" project in ws.apache.org for this code. |
83 | 82 | * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ |
84 | 83 | */ |
85 | 84 | private static final byte[] STANDARD_ENCODE_TABLE = { |
@@ -109,18 +108,15 @@ public class Base64 implements BinaryEncoder, BinaryDecoder { |
109 | 108 | private static final byte PAD = '='; |
110 | 109 |
|
111 | 110 | /** |
112 | | - * This array is a lookup table that translates Unicode characters |
113 | | - * drawn from the "Base64 Alphabet" (as specified in Table 1 of RFC 2045) |
114 | | - * into their 6-bit positive integer equivalents. Characters that |
115 | | - * are not in the Base64 alphabet but fall within the bounds of the |
116 | | - * array are translated to -1. |
117 | | - * |
118 | | - * Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. |
119 | | - * This means decoder seamlessly handles both URL_SAFE and STANDARD base64. |
120 | | - * (The encoder, on the other hand, needs to know ahead of time what to emit). |
121 | | - * |
| 111 | + * This array is a lookup table that translates Unicode characters drawn from the "Base64 Alphabet" (as specified in |
| 112 | + * Table 1 of RFC 2045) into their 6-bit positive integer equivalents. Characters that are not in the Base64 |
| 113 | + * alphabet but fall within the bounds of the array are translated to -1. |
| 114 | + * |
| 115 | + * Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. This means decoder seamlessly handles both |
| 116 | + * URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to know ahead of time what to emit). |
| 117 | + * |
122 | 118 | * Thanks to "commons" project in ws.apache.org for this code. |
123 | | - * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ |
| 119 | + * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/ |
124 | 120 | */ |
125 | 121 | private static final byte[] DECODE_TABLE = { |
126 | 122 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
@@ -236,7 +232,8 @@ public Base64() { |
236 | 232 | * </p> |
237 | 233 | * |
238 | 234 | * @param urlSafe |
239 | | - * if <code>true</code>, URL-safe encoding is used. In most cases this should be set to <code>false</code>. |
| 235 | + * if <code>true</code>, URL-safe encoding is used. In most cases this should be set to |
| 236 | + * <code>false</code>. |
240 | 237 | * @since 1.4 |
241 | 238 | */ |
242 | 239 | public Base64(boolean urlSafe) { |
@@ -284,7 +281,7 @@ public Base64(int lineLength) { |
284 | 281 | * @param lineSeparator |
285 | 282 | * Each line of encoded data will end with this sequence of bytes. |
286 | 283 | * @throws IllegalArgumentException |
287 | | - * Thrown when the provided lineSeparator included some base64 characters. |
| 284 | + * Thrown when the provided lineSeparator included some base64 characters. |
288 | 285 | * @since 1.4 |
289 | 286 | */ |
290 | 287 | public Base64(int lineLength, byte[] lineSeparator) { |
|
0 commit comments