Added and updated comments.

pull/134/head
Project Nayuki 6 years ago
parent b967ae4aae
commit 72d350e3a0

@ -114,6 +114,14 @@ final class BitBuffer {
}
/**
* Appends the specified sequence of bits to this buffer.
* Requires 0 ≤ len ≤ 32 × vals.length.
* @param vals the sequence of bits to append (not {@code null})
* @param len the number of prefix bits to read from the array
* @throws IllegalStateException if appending the data
* would make bitLength exceed Integer.MAX_VALUE
*/
public void appendBits(int[] vals, int len) {
Objects.requireNonNull(vals);
if (len == 0)

@ -227,6 +227,7 @@ public final class QrSegment {
// The data bits of this segment. Not null. Accessed through getData().
final int[] data;
// Requires 0 <= bitLength <= data.length * 32.
final int bitLength;
@ -239,6 +240,7 @@ public final class QrSegment {
* @param md the mode (not {@code null})
* @param numCh the data length in characters or bytes, which is non-negative
* @param data the data bits (not {@code null})
* @param bitLen the number of valid prefix bits in the data array
* @throws NullPointerException if the mode or data is {@code null}
* @throws IllegalArgumentException if the character count is negative
*/

Loading…
Cancel
Save