@@ -45,12 +45,12 @@ public class PercentCodec implements BinaryEncoder, BinaryDecoder {
4545 private static final byte ESCAPE_CHAR = '%' ;
4646
4747 /**
48- * The bit set used to store the character that should be always encoded
48+ * The bit set used to store the character that should be always encoded.
4949 */
5050 private final BitSet alwaysEncodeChars = new BitSet ();
5151
5252 /**
53- * The flag defining if the space character should be encoded as '+'
53+ * The flag defining if the space character should be encoded as '+'.
5454 */
5555 private final boolean plusForSpace ;
5656
@@ -74,8 +74,8 @@ public PercentCodec() {
7474 * always be encoded. The rest US-ASCII characters will not be encoded, except for character '%' that
7575 * is used as escape character for Percent-Encoding.
7676 *
77- * @param alwaysEncodeChars the unsafe characters that should always be encoded
78- * @param plusForSpace the flag defining if the space character should be encoded as '+'
77+ * @param alwaysEncodeChars the unsafe characters that should always be encoded.
78+ * @param plusForSpace the flag defining if the space character should be encoded as '+'.
7979 */
8080 public PercentCodec (final byte [] alwaysEncodeChars , final boolean plusForSpace ) {
8181 this .plusForSpace = plusForSpace ;
@@ -127,9 +127,9 @@ public byte[] decode(final byte[] bytes) throws DecoderException {
127127 /**
128128 * Decodes a byte[] Object, whose bytes are encoded with Percent-Encoding.
129129 *
130- * @param obj the object to decode
131- * @return the decoding result byte[] as Object
132- * @throws DecoderException if the object is not a byte array
130+ * @param obj the object to decode.
131+ * @return the decoding result byte[] as Object.
132+ * @throws DecoderException if the object is not a byte array.
133133 */
134134 @ Override
135135 public Object decode (final Object obj ) throws DecoderException {
@@ -184,9 +184,9 @@ public byte[] encode(final byte[] bytes) throws EncoderException {
184184 /**
185185 * Encodes an object into using the Percent-Encoding. Only byte[] objects are accepted.
186186 *
187- * @param obj the object to encode
188- * @return the encoding result byte[] as Object
189- * @throws EncoderException if the object is not a byte array
187+ * @param obj the object to encode.
188+ * @return the encoding result byte[] as Object.
189+ * @throws EncoderException if the object is not a byte array.
190190 */
191191 @ Override
192192 public Object encode (final Object obj ) throws EncoderException {
@@ -225,7 +225,7 @@ private boolean inAlwaysEncodeCharsRange(final byte c) {
225225 * Inserts a single character into a BitSet and maintains the min and max of the characters of the
226226 * {@code BitSet alwaysEncodeChars} in order to avoid look-ups when a byte is out of this range.
227227 *
228- * @param b the byte that is candidate for min and max limit
228+ * @param b the byte that is candidate for min and max limit.
229229 */
230230 private void insertAlwaysEncodeChar (final byte b ) {
231231 if (b < 0 ) {
@@ -243,7 +243,7 @@ private void insertAlwaysEncodeChar(final byte b) {
243243 /**
244244 * Inserts the byte array into a BitSet for faster lookup.
245245 *
246- * @param alwaysEncodeCharsArray
246+ * @param alwaysEncodeCharsArray the byte array into a BitSet for faster lookup.
247247 */
248248 private void insertAlwaysEncodeChars (final byte [] alwaysEncodeCharsArray ) {
249249 if (alwaysEncodeCharsArray != null ) {
0 commit comments