diff --git a/src/main/java/com/solab/iso8583/util/Bcd.java b/src/main/java/com/solab/iso8583/util/Bcd.java index 39957d0..28e004f 100644 --- a/src/main/java/com/solab/iso8583/util/Bcd.java +++ b/src/main/java/com/solab/iso8583/util/Bcd.java @@ -13,6 +13,10 @@ public final class Bcd { private Bcd(){} + /** Decodes a BCD-encoded number as a long. + * @param buf The byte buffer containing the BCD data. + * @param pos The starting position in the buffer. + * @param length The number of DIGITS (not bytes) to read. */ public static long decodeToLong(byte[] buf, int pos, int length) throws IndexOutOfBoundsException { if (length > 18) { @@ -49,6 +53,10 @@ public final class Bcd { } } + /** Decodes a BCD-encoded number as a BigInteger. + * @param buf The byte buffer containing the BCD data. + * @param pos The starting position in the buffer. + * @param length The number of DIGITS (not bytes) to read. */ public static BigInteger decodeToBigInteger(byte[] buf, int pos, int length) throws IndexOutOfBoundsException { char[] digits = new char[length];