@@ -72,7 +72,7 @@ public Builder() {
7272
7373 @ Override
7474 public Base64 get () {
75- return new Base64 (getLineLength (), getLineSeparator (), getEncodeTable (), getDecodingPolicy ());
75+ return new Base64 (getLineLength (), getLineSeparator (), getPadding (), getEncodeTable (), getDecodingPolicy ());
7676 }
7777
7878 /**
@@ -597,7 +597,7 @@ public Base64(final int lineLength, final byte[] lineSeparator) {
597597 * @since 1.4
598598 */
599599 public Base64 (final int lineLength , final byte [] lineSeparator , final boolean urlSafe ) {
600- this (lineLength , lineSeparator , toUrlSafeEncodeTable (urlSafe ), DECODING_POLICY_DEFAULT );
600+ this (lineLength , lineSeparator , PAD_DEFAULT , toUrlSafeEncodeTable (urlSafe ), DECODING_POLICY_DEFAULT );
601601 }
602602
603603 /**
@@ -628,9 +628,8 @@ public Base64(final int lineLength, final byte[] lineSeparator, final boolean ur
628628 * Thrown when the {@code lineSeparator} contains Base64 characters.
629629 * @since 1.15
630630 */
631- public Base64 (final int lineLength , final byte [] lineSeparator , final boolean urlSafe ,
632- final CodecPolicy decodingPolicy ) {
633- this (lineLength , lineSeparator , toUrlSafeEncodeTable (urlSafe ), decodingPolicy );
631+ public Base64 (final int lineLength , final byte [] lineSeparator , final boolean urlSafe , final CodecPolicy decodingPolicy ) {
632+ this (lineLength , lineSeparator , PAD_DEFAULT , toUrlSafeEncodeTable (urlSafe ), decodingPolicy );
634633 }
635634
636635 /**
@@ -652,14 +651,15 @@ public Base64(final int lineLength, final byte[] lineSeparator, final boolean ur
652651 * decoding.
653652 * @param lineSeparator
654653 * Each line of encoded data will end with this sequence of bytes.
654+ * @param padding padding byte.
655655 * @param encodeTable
656656 * The manual encodeTable - a byte array of 64 chars.
657657 * @param decodingPolicy The decoding policy.
658658 * @throws IllegalArgumentException
659659 * Thrown when the {@code lineSeparator} contains Base64 characters.
660660 */
661- private Base64 (final int lineLength , final byte [] lineSeparator , final byte [] encodeTable , final CodecPolicy decodingPolicy ) {
662- super (BYTES_PER_UNENCODED_BLOCK , BYTES_PER_ENCODED_BLOCK , lineLength , toLength (lineSeparator ), PAD_DEFAULT , decodingPolicy );
661+ private Base64 (final int lineLength , final byte [] lineSeparator , final byte padding , final byte [] encodeTable , final CodecPolicy decodingPolicy ) {
662+ super (BYTES_PER_UNENCODED_BLOCK , BYTES_PER_ENCODED_BLOCK , lineLength , toLength (lineSeparator ), padding , decodingPolicy );
663663 this .encodeTable = Objects .requireNonNull (encodeTable , "encodeTable" );
664664 if (encodeTable == STANDARD_ENCODE_TABLE || encodeTable == URL_SAFE_ENCODE_TABLE ) {
665665 decodeTable = DECODE_TABLE ;
0 commit comments