Skip to content

Commit c1e5462

Browse files
committed
Javadoc
Close HTML tags
1 parent 14068c6 commit c1e5462

9 files changed

Lines changed: 38 additions & 15 deletions

File tree

src/main/java/org/apache/commons/codec/Decoder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
* <p>
2323
* This is the sister interface of {@link Encoder}. All Decoders implement this common generic interface.
2424
* Allows a user to pass a generic Object to any Decoder implementation in the codec package.
25+
* </p>
2526
* <p>
2627
* One of the two interfaces at the center of the codec package.
28+
* </p>
2729
*/
2830
public interface Decoder {
2931

src/main/java/org/apache/commons/codec/DecoderException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public DecoderException(final String message) {
5555
* <p>
5656
* Note that the detail message associated with {@code cause} is not automatically incorporated into this
5757
* exception's detail message.
58+
* </p>
5859
*
5960
* @param message
6061
* The detail message which is saved for later retrieval by the {@link #getMessage()} method.

src/main/java/org/apache/commons/codec/Encoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* This is the sister interface of {@link Decoder}. Every implementation of Encoder provides this
2424
* common generic interface which allows a user to pass a generic Object to any Encoder implementation
2525
* in the codec package.
26+
* </p>
2627
*/
2728
public interface Encoder {
2829

src/main/java/org/apache/commons/codec/binary/Base32.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,10 @@ public boolean isInAlphabet(final byte octet) {
584584
/**
585585
* Validates whether decoding the final trailing character is possible in the context
586586
* of the set of possible base 32 values.
587-
*
588-
* <p>The character is valid if the lower bits within the provided mask are zero. This
587+
* <p>
588+
* The character is valid if the lower bits within the provided mask are zero. This
589589
* is used to test the final trailing base-32 digit is zero in the bits that will be discarded.
590+
* </p>
590591
*
591592
* @param emptyBitsMask The mask of the lower bits that should be empty
592593
* @param context the context to be used

src/main/java/org/apache/commons/codec/binary/Base64.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ public class Base64 extends BaseNCodec {
6767
/**
6868
* This array is a lookup table that translates 6-bit positive integer index values into their "Base64 Alphabet"
6969
* equivalents as specified in Table 1 of RFC 2045.
70-
*
70+
* <p>
7171
* Thanks to "commons" project in ws.apache.org for this code.
7272
* http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
73+
* </p>
7374
*/
7475
private static final byte[] STANDARD_ENCODE_TABLE = {
7576
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
@@ -96,12 +97,14 @@ public class Base64 extends BaseNCodec {
9697
* This array is a lookup table that translates Unicode characters drawn from the "Base64 Alphabet" (as specified
9798
* in Table 1 of RFC 2045) into their 6-bit positive integer equivalents. Characters that are not in the Base64
9899
* alphabet but fall within the bounds of the array are translated to -1.
99-
*
100+
* <p>
100101
* Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. This means decoder seamlessly handles both
101102
* URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to know ahead of time what to emit).
102-
*
103+
* </p>
104+
* <p>
103105
* Thanks to "commons" project in ws.apache.org for this code.
104106
* http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/
107+
* </p>
105108
*/
106109
private static final byte[] DECODE_TABLE = {
107110
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -814,9 +817,10 @@ public boolean isUrlSafe() {
814817
/**
815818
* Validates whether decoding the final trailing character is possible in the context
816819
* of the set of possible base 64 values.
817-
*
818-
* <p>The character is valid if the lower bits within the provided mask are zero. This
820+
* <p>
821+
* The character is valid if the lower bits within the provided mask are zero. This
819822
* is used to test the final trailing base-64 digit is zero in the bits that will be discarded.
823+
* </p>
820824
*
821825
* @param emptyBitsMask The mask of the lower bits that should be empty
822826
* @param context the context to be used

src/main/java/org/apache/commons/codec/binary/BaseNCodec.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
* <p>
3333
* This class is thread-safe.
3434
* </p>
35-
*
35+
* <p>
3636
* You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a
3737
* valid encoding. These can be bits that are unused from the final character or entire characters. The default mode is
3838
* lenient decoding.
39+
* </p>
3940
* <ul>
4041
* <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded.
4142
* <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits are not part of a valid
@@ -307,17 +308,19 @@ private static byte[] resizeBuffer(final Context context, final int minCapacity)
307308
* are not part of a valid encoding. Any unused bits from the final character must
308309
* be zero. Impossible counts of entire final characters are not allowed.
309310
* </ul>
310-
*
311-
* <p>When strict decoding is enabled it is expected that the decoded bytes will be re-encoded
311+
* <p>
312+
* When strict decoding is enabled it is expected that the decoded bytes will be re-encoded
312313
* to a byte array that matches the original, i.e. no changes occur on the final
313314
* character. This requires that the input bytes use the same padding and alphabet
314315
* as the encoder.
316+
* </p>
315317
*/
316318
private final CodecPolicy decodingPolicy;
317319

318320
/**
319321
* Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size.
320322
* If {@code chunkSeparatorLength} is zero, then chunking is disabled.
323+
*
321324
* @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3)
322325
* @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4)
323326
* @param lineLength if &gt; 0, use chunking with a length {@code lineLength}
@@ -331,6 +334,7 @@ protected BaseNCodec(final int unencodedBlockSize, final int encodedBlockSize,
331334
/**
332335
* Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size.
333336
* If {@code chunkSeparatorLength} is zero, then chunking is disabled.
337+
*
334338
* @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3)
335339
* @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4)
336340
* @param lineLength if &gt; 0, use chunking with a length {@code lineLength}
@@ -345,6 +349,7 @@ protected BaseNCodec(final int unencodedBlockSize, final int encodedBlockSize,
345349
/**
346350
* Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size.
347351
* If {@code chunkSeparatorLength} is zero, then chunking is disabled.
352+
*
348353
* @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3)
349354
* @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4)
350355
* @param lineLength if &gt; 0, use chunking with a length {@code lineLength}
@@ -676,7 +681,8 @@ public boolean isStrictDecoding() {
676681
* Extracts buffered data into the provided byte[] array, starting at position bPos, up to a maximum of bAvail
677682
* bytes. Returns how many bytes were actually extracted.
678683
* <p>
679-
* Package protected for access from I/O streams.
684+
* Package private for access from I/O streams.
685+
* </p>
680686
*
681687
* @param b
682688
* byte[] array to extract the buffered data into.

src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ public int available() throws IOException {
7878
* Returns true if decoding behavior is strict. Decoding will raise an
7979
* {@link IllegalArgumentException} if trailing bits are not part of a valid encoding.
8080
*
81-
* <p>The default is false for lenient encoding. Decoding will compose trailing bits
81+
* <p>
82+
* The default is false for lenient encoding. Decoding will compose trailing bits
8283
* into 8-bit bytes and discard the remainder.
84+
* </p>
8385
*
8486
* @return true if using strict decoding
8587
* @since 1.15
@@ -90,7 +92,9 @@ public boolean isStrictDecoding() {
9092

9193
/**
9294
* Marks the current position in this input stream.
93-
* <p>The {@link #mark} method of {@link BaseNCodecInputStream} does nothing.</p>
95+
* <p>
96+
* The {@link #mark} method of {@link BaseNCodecInputStream} does nothing.
97+
* </p>
9498
*
9599
* @param readLimit the maximum limit of bytes that can be read before the mark position becomes invalid.
96100
* @see #markSupported()

src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ private void flush(final boolean propagate) throws IOException {
133133
* Returns true if decoding behavior is strict. Decoding will raise an
134134
* {@link IllegalArgumentException} if trailing bits are not part of a valid encoding.
135135
*
136-
* <p>The default is false for lenient encoding. Decoding will compose trailing bits
136+
* <p>
137+
* The default is false for lenient encoding. Decoding will compose trailing bits
137138
* into 8-bit bytes and discard the remainder.
139+
* </p>
138140
*
139141
* @return true if using strict decoding
140142
* @since 1.15

src/main/java/org/apache/commons/codec/binary/CharSequenceUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ public class CharSequenceUtils {
3232
/**
3333
* Green implementation of regionMatches.
3434
*
35-
* <p>Note: This function differs from the current implementation in Apache Commons Lang
35+
* <p>
36+
* Note: This function differs from the current implementation in Apache Commons Lang
3637
* where the input indices are not valid. It is only used within this package.
38+
* </p>
3739
*
3840
* @param cs
3941
* the {@code CharSequence} to be processed

0 commit comments

Comments
 (0)