This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit b9e6d691ac27cbd73046ddc7d2a23c39dd3b66fc Author: Gary Gregory <[email protected]> AuthorDate: Tue Apr 16 09:59:02 2024 -0400 Javadoc --- .../java/org/apache/commons/codec/binary/Base16.java | 6 +++--- .../apache/commons/codec/binary/Base16InputStream.java | 8 ++++---- .../commons/codec/binary/Base16OutputStream.java | 8 ++++---- .../java/org/apache/commons/codec/binary/Base32.java | 18 +++++++++--------- .../apache/commons/codec/binary/Base32InputStream.java | 8 ++++---- .../commons/codec/binary/Base32OutputStream.java | 8 ++++---- .../java/org/apache/commons/codec/binary/Base64.java | 14 +++++++------- .../apache/commons/codec/binary/Base64InputStream.java | 8 ++++---- .../commons/codec/binary/Base64OutputStream.java | 8 ++++---- .../org/apache/commons/codec/binary/BaseNCodec.java | 9 +++++++++ .../commons/codec/binary/BaseNCodecInputStream.java | 2 +- .../commons/codec/binary/BaseNCodecOutputStream.java | 2 ++ 12 files changed, 55 insertions(+), 44 deletions(-) diff --git a/src/main/java/org/apache/commons/codec/binary/Base16.java b/src/main/java/org/apache/commons/codec/binary/Base16.java index 492d1d38..9d210dd7 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base16.java +++ b/src/main/java/org/apache/commons/codec/binary/Base16.java @@ -114,14 +114,14 @@ public class Base16 extends BaseNCodec { private final byte[] encodeTable; /** - * Creates a Base16 codec used for decoding and encoding. + * Constructs a Base16 codec used for decoding and encoding. */ public Base16() { this(false); } /** - * Creates a Base16 codec used for decoding and encoding. + * Constructs a Base16 codec used for decoding and encoding. * * @param lowerCase if {@code true} then use a lower-case Base16 alphabet. */ @@ -130,7 +130,7 @@ public class Base16 extends BaseNCodec { } /** - * Creates a Base16 codec used for decoding and encoding. + * Constructs a Base16 codec used for decoding and encoding. * * @param lowerCase if {@code true} then use a lower-case Base16 alphabet. * @param decodingPolicy Decoding policy. diff --git a/src/main/java/org/apache/commons/codec/binary/Base16InputStream.java b/src/main/java/org/apache/commons/codec/binary/Base16InputStream.java index de580a15..5c044827 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base16InputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/Base16InputStream.java @@ -33,7 +33,7 @@ import org.apache.commons.codec.CodecPolicy; public class Base16InputStream extends BaseNCodecInputStream { /** - * Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream. + * Constructs a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream. * * @param inputStream InputStream to wrap. */ @@ -42,7 +42,7 @@ public class Base16InputStream extends BaseNCodecInputStream { } /** - * Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + * Constructs a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original * provided InputStream. * * @param inputStream InputStream to wrap. @@ -53,7 +53,7 @@ public class Base16InputStream extends BaseNCodecInputStream { } /** - * Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + * Constructs a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original * provided InputStream. * * @param inputStream InputStream to wrap. @@ -66,7 +66,7 @@ public class Base16InputStream extends BaseNCodecInputStream { } /** - * Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + * Constructs a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original * provided InputStream. * * @param inputStream InputStream to wrap. diff --git a/src/main/java/org/apache/commons/codec/binary/Base16OutputStream.java b/src/main/java/org/apache/commons/codec/binary/Base16OutputStream.java index 18e28764..7e653a37 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base16OutputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/Base16OutputStream.java @@ -33,7 +33,7 @@ import org.apache.commons.codec.CodecPolicy; public class Base16OutputStream extends BaseNCodecOutputStream { /** - * Creates a Base16OutputStream such that all data written is Hex-encoded to the original provided OutputStream. + * Constructs a Base16OutputStream such that all data written is Hex-encoded to the original provided OutputStream. * * @param outputStream OutputStream to wrap. */ @@ -42,7 +42,7 @@ public class Base16OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + * Constructs a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the * original provided OutputStream. * * @param outputStream OutputStream to wrap. @@ -53,7 +53,7 @@ public class Base16OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + * Constructs a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the * original provided OutputStream. * * @param outputStream OutputStream to wrap. @@ -65,7 +65,7 @@ public class Base16OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + * Constructs a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the * original provided OutputStream. * * @param outputStream OutputStream to wrap. diff --git a/src/main/java/org/apache/commons/codec/binary/Base32.java b/src/main/java/org/apache/commons/codec/binary/Base32.java index 3bc44f08..bfcb23aa 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base32.java +++ b/src/main/java/org/apache/commons/codec/binary/Base32.java @@ -154,7 +154,7 @@ public class Base32 extends BaseNCodec { private final byte[] lineSeparator; /** - * Creates a Base32 codec used for decoding and encoding. + * Constructs a Base32 codec used for decoding and encoding. * <p> * When encoding the line length is 0 (no chunking). * </p> @@ -164,7 +164,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 codec used for decoding and encoding. + * Constructs a Base32 codec used for decoding and encoding. * <p> * When encoding the line length is 0 (no chunking). * </p> @@ -176,7 +176,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 codec used for decoding and encoding. + * Constructs a Base32 codec used for decoding and encoding. * <p> * When encoding the line length is 0 (no chunking). * </p> @@ -189,7 +189,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 codec used for decoding and encoding. + * Constructs a Base32 codec used for decoding and encoding. * <p> * When encoding the line length is 0 (no chunking). * </p> @@ -201,7 +201,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 codec used for decoding and encoding. + * Constructs a Base32 codec used for decoding and encoding. * <p> * When encoding the line length is given in the constructor, the line separator is CRLF. * </p> @@ -214,7 +214,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 codec used for decoding and encoding. + * Constructs a Base32 codec used for decoding and encoding. * <p> * When encoding the line length and line separator are given in the constructor. * </p> @@ -232,7 +232,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 / Base32 Hex codec used for decoding and encoding. + * Constructs a Base32 / Base32 Hex codec used for decoding and encoding. * <p> * When encoding the line length and line separator are given in the constructor. * </p> @@ -251,7 +251,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 / Base32 Hex codec used for decoding and encoding. + * Constructs a Base32 / Base32 Hex codec used for decoding and encoding. * <p> * When encoding the line length and line separator are given in the constructor. * </p> @@ -271,7 +271,7 @@ public class Base32 extends BaseNCodec { } /** - * Creates a Base32 / Base32 Hex codec used for decoding and encoding. + * Constructs a Base32 / Base32 Hex codec used for decoding and encoding. * <p> * When encoding the line length and line separator are given in the constructor. * </p> diff --git a/src/main/java/org/apache/commons/codec/binary/Base32InputStream.java b/src/main/java/org/apache/commons/codec/binary/Base32InputStream.java index 82091760..51adce23 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base32InputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/Base32InputStream.java @@ -55,7 +55,7 @@ import org.apache.commons.codec.CodecPolicy; public class Base32InputStream extends BaseNCodecInputStream { /** - * Creates a Base32InputStream such that all data read is Base32-decoded from the original provided InputStream. + * Constructs a Base32InputStream such that all data read is Base32-decoded from the original provided InputStream. * * @param inputStream * InputStream to wrap. @@ -65,7 +65,7 @@ public class Base32InputStream extends BaseNCodecInputStream { } /** - * Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + * Constructs a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original * provided InputStream. * * @param inputStream @@ -78,7 +78,7 @@ public class Base32InputStream extends BaseNCodecInputStream { } /** - * Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + * Constructs a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original * provided InputStream. * * @param inputStream @@ -98,7 +98,7 @@ public class Base32InputStream extends BaseNCodecInputStream { } /** - * Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + * Constructs a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original * provided InputStream. * * @param inputStream diff --git a/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java b/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java index c0bc740c..5977ae9d 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/Base32OutputStream.java @@ -59,7 +59,7 @@ import org.apache.commons.codec.CodecPolicy; public class Base32OutputStream extends BaseNCodecOutputStream { /** - * Creates a Base32OutputStream such that all data written is Base32-encoded to the original provided OutputStream. + * Constructs a Base32OutputStream such that all data written is Base32-encoded to the original provided OutputStream. * * @param outputStream * OutputStream to wrap. @@ -69,7 +69,7 @@ public class Base32OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + * Constructs a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the * original provided OutputStream. * * @param outputStream @@ -82,7 +82,7 @@ public class Base32OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + * Constructs a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the * original provided OutputStream. * * @param outputStream @@ -102,7 +102,7 @@ public class Base32OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + * Constructs a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the * original provided OutputStream. * * @param outputStream diff --git a/src/main/java/org/apache/commons/codec/binary/Base64.java b/src/main/java/org/apache/commons/codec/binary/Base64.java index 76db3ddb..4e7f5d25 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base64.java +++ b/src/main/java/org/apache/commons/codec/binary/Base64.java @@ -529,7 +529,7 @@ public class Base64 extends BaseNCodec { private final int encodeSize; /** - * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. * <p> * When encoding the line length is 0 (no chunking), and the encoding table is STANDARD_ENCODE_TABLE. * </p> @@ -543,7 +543,7 @@ public class Base64 extends BaseNCodec { } /** - * Creates a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode. * <p> * When encoding the line length is 76, the line separator is CRLF, and the encoding table is STANDARD_ENCODE_TABLE. * </p> @@ -562,7 +562,7 @@ public class Base64 extends BaseNCodec { } /** - * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. * <p> * When encoding the line length is given in the constructor, the line separator is CRLF, and the encoding table is * STANDARD_ENCODE_TABLE. @@ -586,7 +586,7 @@ public class Base64 extends BaseNCodec { /** - * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. * <p> * When encoding the line length and line separator are given in the constructor, and the encoding table is * STANDARD_ENCODE_TABLE. @@ -613,7 +613,7 @@ public class Base64 extends BaseNCodec { } /** - * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. * <p> * When encoding the line length and line separator are given in the constructor, and the encoding table is * STANDARD_ENCODE_TABLE. @@ -644,7 +644,7 @@ public class Base64 extends BaseNCodec { } /** - * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. * <p> * When encoding the line length and line separator are given in the constructor, and the encoding table is * STANDARD_ENCODE_TABLE. @@ -677,7 +677,7 @@ public class Base64 extends BaseNCodec { } /** - * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + * Constructs a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. * <p> * When encoding the line length and line separator are given in the constructor, and the encoding table is * STANDARD_ENCODE_TABLE. diff --git a/src/main/java/org/apache/commons/codec/binary/Base64InputStream.java b/src/main/java/org/apache/commons/codec/binary/Base64InputStream.java index 6a96217b..45ce8b41 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base64InputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/Base64InputStream.java @@ -59,7 +59,7 @@ import org.apache.commons.codec.CodecPolicy; public class Base64InputStream extends BaseNCodecInputStream { /** - * Creates a Base64InputStream such that all data read is Base64-decoded from the original provided InputStream. + * Constructs a Base64InputStream such that all data read is Base64-decoded from the original provided InputStream. * * @param inputStream * InputStream to wrap. @@ -69,7 +69,7 @@ public class Base64InputStream extends BaseNCodecInputStream { } /** - * Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + * Constructs a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original * provided InputStream. * * @param inputStream @@ -82,7 +82,7 @@ public class Base64InputStream extends BaseNCodecInputStream { } /** - * Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + * Constructs a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original * provided InputStream. * * @param inputStream @@ -102,7 +102,7 @@ public class Base64InputStream extends BaseNCodecInputStream { } /** - * Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + * Constructs a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original * provided InputStream. * * @param inputStream diff --git a/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java b/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java index 492610da..43b87da5 100644 --- a/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/Base64OutputStream.java @@ -63,7 +63,7 @@ import org.apache.commons.codec.CodecPolicy; public class Base64OutputStream extends BaseNCodecOutputStream { /** - * Creates a Base64OutputStream such that all data written is Base64-encoded to the original provided OutputStream. + * Constructs a Base64OutputStream such that all data written is Base64-encoded to the original provided OutputStream. * * @param outputStream * OutputStream to wrap. @@ -73,7 +73,7 @@ public class Base64OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + * Constructs a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the * original provided OutputStream. * * @param outputStream @@ -86,7 +86,7 @@ public class Base64OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + * Constructs a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the * original provided OutputStream. * * @param outputStream @@ -106,7 +106,7 @@ public class Base64OutputStream extends BaseNCodecOutputStream { } /** - * Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + * Constructs a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the * original provided OutputStream. * * @param outputStream diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java index b0e64622..3a73e4ee 100644 --- a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java +++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java @@ -312,8 +312,11 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder { private final CodecPolicy decodingPolicy; /** + * Constructs a new instance. + * <p> * Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size. * If {@code chunkSeparatorLength} is zero, then chunking is disabled. + * </p> * * @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3) * @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4) @@ -326,8 +329,11 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder { } /** + * Constructs a new instance. + * <p> * Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size. * If {@code chunkSeparatorLength} is zero, then chunking is disabled. + * </p> * * @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3) * @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4) @@ -341,8 +347,11 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder { } /** + * Constructs a new instance. + * <p> * Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size. * If {@code chunkSeparatorLength} is zero, then chunking is disabled. + * </p> * * @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3) * @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4) diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java index ac147183..bf0feb47 100644 --- a/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java @@ -44,7 +44,7 @@ public class BaseNCodecInputStream extends FilterInputStream { private final Context context = new Context(); /** - * Create an instance. + * Constructs a new instance. * * @param inputStream the input stream * @param baseNCodec the codec diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java index b3f141ab..19647593 100644 --- a/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java @@ -48,6 +48,8 @@ public class BaseNCodecOutputStream extends FilterOutputStream { private final Context context = new Context(); /** + * Constructs a new instance. + * * TODO should this be protected? * * @param outputStream the underlying output or null.
