@@ -109,26 +109,6 @@ public Base64 get() {
109109 return new Base64 (this );
110110 }
111111
112- @ Override
113- public Builder setEncodeTable (final byte ... encodeTable ) {
114- final boolean isStandardEncodeTable = Arrays .equals (encodeTable , STANDARD_ENCODE_TABLE );
115- final boolean isUrlSafe = Arrays .equals (encodeTable , URL_SAFE_ENCODE_TABLE );
116- setDecodeTableRaw (isStandardEncodeTable || isUrlSafe ? DECODE_TABLE : calculateDecodeTable (encodeTable ));
117- return super .setEncodeTable (encodeTable );
118- }
119-
120- /**
121- * Sets the URL-safe encoding policy.
122- * This method does not modify behavior on decoding operations. For configuration of the decoding behavior,
123- * please use {@link #setDecodeTableFormat} method.
124- *
125- * @param urlSafe URL-safe encoding policy, null resets to the default.
126- * @return {@code this} instance.
127- */
128- public Builder setUrlSafe (final boolean urlSafe ) {
129- return setEncodeTable (toUrlSafeEncodeTable (urlSafe ));
130- }
131-
132112 /**
133113 * Sets the format of the decoding table.
134114 * This method allows to explicitly state whether a "standard" or "URL Safe" Base64 decoding is expected.
@@ -158,6 +138,26 @@ public Builder setDecodeTableFormat(final DecodeTableFormat format) {
158138 }
159139 }
160140
141+ @ Override
142+ public Builder setEncodeTable (final byte ... encodeTable ) {
143+ final boolean isStandardEncodeTable = Arrays .equals (encodeTable , STANDARD_ENCODE_TABLE );
144+ final boolean isUrlSafe = Arrays .equals (encodeTable , URL_SAFE_ENCODE_TABLE );
145+ setDecodeTableRaw (isStandardEncodeTable || isUrlSafe ? DECODE_TABLE : calculateDecodeTable (encodeTable ));
146+ return super .setEncodeTable (encodeTable );
147+ }
148+
149+ /**
150+ * Sets the URL-safe encoding policy.
151+ * This method does not modify behavior on decoding operations. For configuration of the decoding behavior,
152+ * please use {@link #setDecodeTableFormat} method.
153+ *
154+ * @param urlSafe URL-safe encoding policy, null resets to the default.
155+ * @return {@code this} instance.
156+ */
157+ public Builder setUrlSafe (final boolean urlSafe ) {
158+ return setEncodeTable (toUrlSafeEncodeTable (urlSafe ));
159+ }
160+
161161 }
162162
163163 /**
0 commit comments