Skip to content

Commit 54f6443

Browse files
committed
Javadoc
1 parent d9233f5 commit 54f6443

39 files changed

+575
-576
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ public static Charset toCharset(final Charset charset) {
151151
* Returns a Charset for the named charset. If the name is null, return the default Charset.
152152
*
153153
* @param charset The name of the requested charset, may be null.
154-
* @return a Charset for the named charset
155-
* @throws java.nio.charset.UnsupportedCharsetException If the named charset is unavailable
154+
* @return a Charset for the named charset.
155+
* @throws java.nio.charset.UnsupportedCharsetException If the named charset is unavailable.
156156
*/
157157
public static Charset toCharset(final String charset) {
158158
return charset == null ? Charset.defaultCharset() : Charset.forName(charset);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public interface Decoder {
3535
* {@link ClassCastException} occurs this decode method will throw a DecoderException.
3636
*
3737
* @param source
38-
* the object to decode
39-
* @return a 'decoded" object
38+
* the object to decode.
39+
* @return a 'decoded" object.
4040
* @throws DecoderException
4141
* a decoder exception can be thrown for any number of reasons. Some good candidates are that the
4242
* parameter passed to this method is null, a param cannot be cast to the appropriate type for a

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public interface Encoder {
3232
* {@code byte[]} or {@code String}s depending on the implementation used.
3333
*
3434
* @param source
35-
* An object to encode
36-
* @return An "encoded" Object
35+
* An object to encode.
36+
* @return An "encoded" Object.
3737
* @throws EncoderException
3838
* An encoder exception is thrown if the encoder experiences a failure condition during the encoding
3939
* process.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public StringEncoderComparator(final StringEncoder stringEncoder) {
6363
* If an {@link EncoderException} is encountered, return {@code 0}.
6464
*
6565
* @param o1
66-
* the object to compare
66+
* the object to compare.
6767
* @param o2
68-
* the object to compare to
68+
* the object to compare to.
6969
* @return the Comparable.compareTo() return code or 0 if an encoding error was caught.
7070
* @see Comparable
7171
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public boolean isInAlphabet(final byte octet) {
285285
/**
286286
* Validates whether decoding allows an entire final trailing character that cannot be used for a complete byte.
287287
*
288-
* @throws IllegalArgumentException if strict decoding is enabled
288+
* @throws IllegalArgumentException if strict decoding is enabled.
289289
*/
290290
private void validateTrailingCharacter() {
291291
if (isStrictDecoding()) {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ public Base32(final int lineLength, final byte[] lineSeparator, final boolean us
517517
* @param input byte[] array of ASCII data to Base32 decode.
518518
* @param inPos Position to start reading data from.
519519
* @param inAvail Amount of bytes available from input for decoding.
520-
* @param context the context to be used
520+
* @param context the context to be used.
521521
*/
522522
@Override
523523
void decode(final byte[] input, int inPos, final int inAvail, final Context context) {
@@ -623,7 +623,7 @@ void decode(final byte[] input, int inPos, final int inAvail, final Context cont
623623
* @param input byte[] array of binary data to Base32 encode.
624624
* @param inPos Position to start reading data from.
625625
* @param inAvail Amount of bytes available from input for encoding.
626-
* @param context the context to be used
626+
* @param context the context to be used.
627627
*/
628628
@Override
629629
void encode(final byte[] input, int inPos, final int inAvail, final Context context) {
@@ -733,7 +733,7 @@ byte[] getLineSeparator() {
733733
/**
734734
* Returns whether or not the {@code octet} is in the Base32 alphabet.
735735
*
736-
* @param octet The value to test
736+
* @param octet The value to test.
737737
* @return {@code true} if the value is defined in the Base32 alphabet {@code false} otherwise.
738738
*/
739739
@Override
@@ -748,9 +748,9 @@ public boolean isInAlphabet(final byte octet) {
748748
* that will be discarded.
749749
* </p>
750750
*
751-
* @param emptyBitsMask The mask of the lower bits that should be empty
752-
* @param context the context to be used
753-
* @throws IllegalArgumentException if the bits being checked contain any non-zero value
751+
* @param emptyBitsMask The mask of the lower bits that should be empty.
752+
* @param context the context to be used.
753+
* @throws IllegalArgumentException if the bits being checked contain any non-zero value.
754754
*/
755755
private void validateCharacter(final long emptyBitsMask, final Context context) {
756756
// Use the long bit work area
@@ -763,7 +763,7 @@ private void validateCharacter(final long emptyBitsMask, final Context context)
763763
/**
764764
* Validates whether decoding allows final trailing characters that cannot be created during encoding.
765765
*
766-
* @throws IllegalArgumentException if strict decoding is enabled
766+
* @throws IllegalArgumentException if strict decoding is enabled.
767767
*/
768768
private void validateTrailingCharacters() {
769769
if (isStrictDecoding()) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ public static byte[] encodeBase64(final byte[] binaryData, final boolean isChunk
497497
* Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.
498498
*
499499
* @param binaryData Array containing binary data to encode.
500-
* @param isChunked if {@code true} this encoder will chunk the base64 output into 76 character blocks
500+
* @param isChunked if {@code true} this encoder will chunk the base64 output into 76 character blocks.
501501
* @param urlSafe if {@code true} this encoder will emit - and _ instead of the usual + and / characters. <strong>No padding is added when encoding
502502
* using the URL-safe alphabet.</strong>
503503
* @param maxResultSize The maximum result size to accept.
@@ -536,7 +536,7 @@ public static byte[] encodeBase64Chunked(final byte[] binaryData) {
536536
* <strong> We changed the behavior of this method from multi-line chunking (1.4) to single-line non-chunking (1.5).</strong>
537537
* </p>
538538
*
539-
* @param binaryData binary data to encode
539+
* @param binaryData binary data to encode.
540540
* @return String containing Base64 characters.
541541
* @since 1.4 (NOTE: 1.4 chunked the output, whereas 1.5 does not).
542542
*/
@@ -754,8 +754,8 @@ public static boolean isBase64Url(final String base64) {
754754
/**
755755
* Returns a byte-array representation of a {@code BigInteger} without sign bit.
756756
*
757-
* @param bigInt {@code BigInteger} to be converted
758-
* @return a byte array representation of the BigInteger parameter
757+
* @param bigInt {@code BigInteger} to be converted.
758+
* @return a byte array representation of the BigInteger parameter.
759759
*/
760760
static byte[] toIntegerBytes(final BigInteger bigInt) {
761761
int bitlen = bigInt.bitLength();

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ public String toString() {
357357
* Create a positive capacity at least as large the minimum required capacity. If the minimum capacity is negative then this throws an OutOfMemoryError as
358358
* no array can be allocated.
359359
*
360-
* @param minCapacity the minimum capacity
361-
* @return the capacity
362-
* @throws OutOfMemoryError if the {@code minCapacity} is negative
360+
* @param minCapacity the minimum capacity.
361+
* @return the capacity.
362+
* @throws OutOfMemoryError if the {@code minCapacity} is negative.
363363
*/
364364
private static int createPositiveCapacity(final int minCapacity) {
365365
if (minCapacity < 0) {
@@ -380,7 +380,7 @@ private static int createPositiveCapacity(final int minCapacity) {
380380
/**
381381
* Gets a copy of the chunk separator per RFC 2045 section 2.1.
382382
*
383-
* @return the chunk separator
383+
* @return the chunk separator.
384384
* @see <a href="https://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 2.1</a>
385385
* @since 1.15
386386
*/
@@ -401,8 +401,8 @@ static int getLength(final byte[] array) {
401401
/**
402402
* Checks if a byte value is whitespace or not.
403403
*
404-
* @param byteToCheck the byte to check
405-
* @return true if byte is whitespace, false otherwise
404+
* @param byteToCheck the byte to check.
405+
* @return true if byte is whitespace, false otherwise.
406406
* @see Character#isWhitespace(int)
407407
* @deprecated Use {@link Character#isWhitespace(int)}.
408408
*/
@@ -414,10 +414,10 @@ protected static boolean isWhiteSpace(final byte byteToCheck) {
414414
/**
415415
* Increases our buffer by the {@link #DEFAULT_BUFFER_RESIZE_FACTOR}.
416416
*
417-
* @param context the context to be used
417+
* @param context the context to be used.
418418
* @param minCapacity the minimum required capacity
419-
* @return the resized byte[] buffer
420-
* @throws OutOfMemoryError if the {@code minCapacity} is negative
419+
* @return the resized byte[] buffer.
420+
* @throws OutOfMemoryError if the {@code minCapacity} is negative.
421421
*/
422422
private static byte[] resizeBuffer(final Context context, final int minCapacity) {
423423
// Overflow-conscious code treats the min and new capacity as unsigned.
@@ -732,7 +732,7 @@ public String encodeToString(final byte[] array) {
732732
*
733733
* @param size minimum spare space required.
734734
* @param context the context to be used.
735-
* @return the buffer
735+
* @return the buffer.
736736
*/
737737
protected byte[] ensureBufferSize(final int size, final Context context) {
738738
if (context.buffer == null) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public synchronized void mark(final int readLimit) {
162162
/**
163163
* {@inheritDoc}
164164
*
165-
* @return Always returns {@code false}
165+
* @return Always returns {@code false}.
166166
*/
167167
@Override
168168
public boolean markSupported() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected BaseNCodecOutputStream(final AbstractBuilder<T, C, B> builder) {
112112
*
113113
* @param outputStream the underlying output or null.
114114
* @param basedCodec a BaseNCodec.
115-
* @param doEncode true to encode, false to decode, TODO should be an enum?
115+
* @param doEncode true to encode, false to decode, TODO should be an enum?.
116116
*/
117117
public BaseNCodecOutputStream(final OutputStream outputStream, final C basedCodec, final boolean doEncode) {
118118
super(outputStream);

0 commit comments

Comments
 (0)