Lines Matching refs:ecl
61 * ecl argument if it can be done without increasing the version.
63 * @param ecl the error correction level to use (not {@code null}) (boostable)
69 public static QrCode encodeText(String text, Ecc ecl) {
71 Objects.requireNonNull(ecl);
73 return encodeSegments(segs, ecl);
81 * The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
83 * @param ecl the error correction level to use (not {@code null}) (boostable)
89 public static QrCode encodeBinary(byte[] data, Ecc ecl) {
91 Objects.requireNonNull(ecl);
93 return encodeSegments(Arrays.asList(seg), ecl);
102 * of the result may be higher than the ecl argument if it can be done without increasing the version.
108 * @param ecl the error correction level to use (not {@code null}) (boostable)
114 public static QrCode encodeSegments(List<QrSegment> segs, Ecc ecl) {
115 return encodeSegments(segs, ecl, MIN_VERSION, MAX_VERSION, -1, true);
123 * result may be higher than the ecl argument if it can be done without increasing
131 * @param ecl the error correction level to use (not {@code null}) (boostable)
143 public static QrCode encodeSegments(List<QrSegment> segs, Ecc ecl, int minVersion, int maxVersion, int mask, boolean boostEcl) {
145 Objects.requireNonNull(ecl);
152 int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; // Number of data bits available
168 ecl = newEcl;
181 int dataCapacityBits = getNumDataCodewords(version, ecl) * 8;
192 return new QrCode(version, ecl, bb.getBytes(), mask);
231 * @param ecl the error correction level to use
238 public QrCode(int ver, Ecc ecl, byte[] dataCodewords, int msk) {
246 errorCorrectionLevel = Objects.requireNonNull(ecl);
492 static int getNumDataCodewords(int ver, Ecc ecl) {
494 - ECC_CODEWORDS_PER_BLOCK [ecl.ordinal()][ver]
495 * NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal()][ver];