@@ -71,12 +71,12 @@ public class Base64 implements BinaryEncoder, BinaryDecoder {
7171
7272 /**
7373 * Line length for encoding. Not used when decoding. Any value of zero or less implies
74- * so chunking of the base64 encoded data.
74+ * no chunking of the base64 encoded data.
7575 */
7676 private final int lineLength ;
7777
7878 /**
79- * Line separator for encoding. Not used when decoding. Only used if lineLength >= 1 .
79+ * Line separator for encoding. Not used when decoding. Only used if lineLength > 0 .
8080 */
8181 private final byte [] lineSeparator ;
8282
@@ -110,7 +110,7 @@ public class Base64 implements BinaryEncoder, BinaryDecoder {
110110 /**
111111 * Variable tracks how many characters have been written to the current line.
112112 * Only used when encoding. We use it to make sure each encoded line never
113- * goes beyond lineLength (if lineLength >= 0).
113+ * goes beyond lineLength (if lineLength > 0).
114114 */
115115 private int currentLinePos ;
116116
@@ -152,7 +152,9 @@ public Base64() {
152152 * </p>
153153 *
154154 * @param lineLength each line of encoded data will be at most this long
155- * (rounded up to nearest multiple of 4). Ignored when decoding.
155+ * (rounded up to nearest multiple of 4).
156+ * If lineLength <= 0, then the output will not be divided into lines (chunks).
157+ * Ignored when decoding.
156158 */
157159 public Base64 (int lineLength ) {
158160 this (lineLength , CHUNK_SEPARATOR );
@@ -169,8 +171,10 @@ public Base64(int lineLength) {
169171 * </p>
170172 * @param lineLength Each line of encoded data will be at most this long
171173 * (rounded up to nearest multiple of 4). Ignored when decoding.
174+ * If <= 0, then output will not be divided into lines (chunks).
172175 * @param lineSeparator Each line of encoded data will end with this
173176 * sequence of bytes.
177+ * If lineLength <= 0, then the lineSeparator is not used.
174178 * @throws IllegalArgumentException The provided lineSeparator included
175179 * some base64 characters. That's not going to work!
176180 */
0 commit comments