4545 */
4646public class BCodec extends RFC1522Codec implements StringEncoder , StringDecoder {
4747 /**
48- * The default charset used for string decoding and encoding.
48+ * The default Charset used for string decoding and encoding.
4949 */
5050 private final Charset charset ;
5151
@@ -57,10 +57,10 @@ public BCodec() {
5757 }
5858
5959 /**
60- * Constructor which allows for the selection of a default charset
60+ * Constructor which allows for the selection of a default Charset
6161 *
6262 * @param charset
63- * the default string charset to use.
63+ * the default string Charset to use.
6464 *
6565 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
6666 * @since 1.7
@@ -70,13 +70,13 @@ public BCodec(final Charset charset) {
7070 }
7171
7272 /**
73- * Constructor which allows for the selection of a default charset
73+ * Constructor which allows for the selection of a default Charset
7474 *
7575 * @param charsetName
76- * the default charset to use.
76+ * the default Charset to use.
7777 * @throws java.nio.charset.UnsupportedCharsetException
78- * If the named charset is unavailable
79- * @since 1.7 throws UnsupportedCharsetException if the named charset is unavailable
78+ * If the named Charset is unavailable
79+ * @since 1.7 throws UnsupportedCharsetException if the named Charset is unavailable
8080 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
8181 */
8282 public BCodec (final String charsetName ) {
@@ -105,61 +105,61 @@ protected byte[] doDecoding(final byte[] bytes) {
105105 }
106106
107107 /**
108- * Encodes a string into its Base64 form using the specified charset . Unsafe characters are escaped.
108+ * Encodes a string into its Base64 form using the specified Charset . Unsafe characters are escaped.
109109 *
110- * @param value
110+ * @param strSource
111111 * string to convert to Base64 form
112- * @param charset
113- * the charset for <code>value</code>
112+ * @param sourceCharset
113+ * the Charset for <code>value</code>
114114 * @return Base64 string
115115 * @throws EncoderException
116116 * thrown if a failure condition is encountered during the encoding process.
117117 * @since 1.7
118118 */
119- public String encode (final String value , final Charset charset ) throws EncoderException {
120- if (value == null ) {
119+ public String encode (final String strSource , final Charset sourceCharset ) throws EncoderException {
120+ if (strSource == null ) {
121121 return null ;
122122 }
123- return encodeText (value , charset );
123+ return encodeText (strSource , sourceCharset );
124124 }
125125
126126 /**
127- * Encodes a string into its Base64 form using the specified charset . Unsafe characters are escaped.
127+ * Encodes a string into its Base64 form using the specified Charset . Unsafe characters are escaped.
128128 *
129- * @param value
129+ * @param strSource
130130 * string to convert to Base64 form
131- * @param charset
132- * the charset for <code>value</code>
131+ * @param sourceCharset
132+ * the Charset for <code>value</code>
133133 * @return Base64 string
134134 * @throws EncoderException
135135 * thrown if a failure condition is encountered during the encoding process.
136136 */
137- public String encode (final String value , final String charset ) throws EncoderException {
138- if (value == null ) {
137+ public String encode (final String strSource , final String sourceCharset ) throws EncoderException {
138+ if (strSource == null ) {
139139 return null ;
140140 }
141141 try {
142- return this .encodeText (value , charset );
142+ return this .encodeText (strSource , sourceCharset );
143143 } catch (final UnsupportedEncodingException e ) {
144144 throw new EncoderException (e .getMessage (), e );
145145 }
146146 }
147147
148148 /**
149- * Encodes a string into its Base64 form using the default charset . Unsafe characters are escaped.
149+ * Encodes a string into its Base64 form using the default Charset . Unsafe characters are escaped.
150150 *
151- * @param value
151+ * @param strSource
152152 * string to convert to Base64 form
153153 * @return Base64 string
154154 * @throws EncoderException
155155 * thrown if a failure condition is encountered during the encoding process.
156156 */
157157 @ Override
158- public String encode (final String value ) throws EncoderException {
159- if (value == null ) {
158+ public String encode (final String strSource ) throws EncoderException {
159+ if (strSource == null ) {
160160 return null ;
161161 }
162- return encode (value , this .getCharset ());
162+ return encode (strSource , this .getCharset ());
163163 }
164164
165165 /**
@@ -185,7 +185,7 @@ public String decode(final String value) throws DecoderException {
185185 }
186186
187187 /**
188- * Encodes an object into its Base64 form using the default charset . Unsafe characters are escaped.
188+ * Encodes an object into its Base64 form using the default Charset . Unsafe characters are escaped.
189189 *
190190 * @param value
191191 * object to convert to Base64 form
@@ -231,19 +231,19 @@ public Object decode(final Object value) throws DecoderException {
231231 }
232232
233233 /**
234- * Gets the default charset name used for string decoding and encoding.
234+ * Gets the default Charset name used for string decoding and encoding.
235235 *
236- * @return the default charset name
236+ * @return the default Charset name
237237 * @since 1.7
238238 */
239239 public Charset getCharset () {
240240 return this .charset ;
241241 }
242242
243243 /**
244- * Gets the default charset name used for string decoding and encoding.
244+ * Gets the default Charset name used for string decoding and encoding.
245245 *
246- * @return the default charset name
246+ * @return the default Charset name
247247 */
248248 public String getDefaultCharset () {
249249 return this .charset .name ();
0 commit comments