You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/06/12 19:15:45 UTC

[commons-codec] 03/03: Comment protected members

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git

commit b22276db7282efa0794e2cca02a32006c0bca0dd
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Sun Jun 12 20:10:39 2022 +0100

    Comment protected members
---
 src/main/java/org/apache/commons/codec/binary/BaseNCodec.java      | 3 ++-
 .../org/apache/commons/codec/binary/BaseNCodecInputStream.java     | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

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 d74e2f54..6a553871 100644
--- a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
+++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
@@ -295,7 +295,8 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder {
     @Deprecated
     protected final byte PAD = PAD_DEFAULT; // instance variable just in case it needs to vary later
 
-    protected final byte pad; // instance variable just in case it needs to vary later
+    /** Pad byte. Instance variable just in case it needs to vary later. */
+    protected final byte pad;
 
     /** Number of bytes in each full block of unencoded data, e.g. 4 for Base64 and 5 for Base32 */
     private final int unencodedBlockSize;
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 c3cea47f..703278bd 100644
--- a/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
+++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
@@ -43,6 +43,13 @@ public class BaseNCodecInputStream extends FilterInputStream {
 
     private final Context context = new Context();
 
+    /**
+     * Create an instance.
+     *
+     * @param input the input stream
+     * @param baseNCodec the codec
+     * @param doEncode set to true to perform encoding, else decoding
+     */
     protected BaseNCodecInputStream(final InputStream input, final BaseNCodec baseNCodec, final boolean doEncode) {
         super(input);
         this.doEncode = doEncode;