本文整理汇总了Java中com.google.zxing.qrcode.decoder.Mode.getCharacterCountBits方法的典型用法代码示例。如果您正苦于以下问题:Java Mode.getCharacterCountBits方法的具体用法?Java Mode.getCharacterCountBits怎么用?Java Mode.getCharacterCountBits使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.qrcode.decoder.Mode
的用法示例。
在下文中一共展示了Mode.getCharacterCountBits方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appendLengthInfo
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
/**
* Append length info. On success, store the result in "bits".
*/
static void appendLengthInfo(int numLetters, Version version, Mode mode, BitArray bits) throws WriterException {
int numBits = mode.getCharacterCountBits(version);
if (numLetters >= (1 << numBits)) {
throw new WriterException(numLetters + " is bigger than " + ((1 << numBits) - 1));
}
bits.appendBits(numLetters, numBits);
}
示例2: appendLengthInfo
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
static void appendLengthInfo(int numLetters, Version version, Mode mode, BitArray bits)
throws WriterException {
int numBits = mode.getCharacterCountBits(version);
if (numLetters >= (1 << numBits)) {
throw new WriterException(numLetters + " is bigger than " + ((1 << numBits) - 1));
}
bits.appendBits(numLetters, numBits);
}
示例3: appendLengthInfo
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
/**
* Append length info. On success, store the result in "bits".
*/
static void appendLengthInfo(int numLetters, Version version, Mode mode, BitArray bits) throws WriterException {
int numBits = mode.getCharacterCountBits(version);
if (numLetters >= (1 << numBits)) {
throw new WriterException(numLetters + " is bigger than " + ((1 << numBits) - 1));
}
bits.appendBits(numLetters, numBits);
}
示例4: a
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
static void a(int i, int j, Mode mode, BitArray bitarray)
{
int k = mode.getCharacterCountBits(Version.getVersionForNumber(j));
if (i > -1 + (1 << k))
{
throw new WriterException((new StringBuilder()).append(i).append("is bigger than").append(-1 + (1 << k)).toString());
} else
{
bitarray.appendBits(i, k);
return;
}
}
示例5: appendLengthInfo
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
/**
* Append length info. On success, store the result in "bits".
*/
static void appendLengthInfo(int numLetters, Version version, Mode mode, BitArray bits) throws WriterException {
int numBits = mode.getCharacterCountBits(version);
if (numLetters >= (1 << numBits)) {
throw new WriterException(numLetters + " is bigger than " + ((1 << numBits) - 1));
}
bits.appendBits(numLetters, numBits);
}
示例6: appendLengthInfo
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
/**
* Append length info. On success, store the result in "bits".
*/
static void appendLengthInfo(int numLetters, int version, Mode mode, BitArray bits)
throws WriterException {
int numBits = mode.getCharacterCountBits(Version.getVersionForNumber(version));
if (numLetters > ((1 << numBits) - 1)) {
throw new WriterException(numLetters + "is bigger than" + ((1 << numBits) - 1));
}
bits.appendBits(numLetters, numBits);
}
示例7: appendLengthInfo
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
/**
* Append length info. On success, store the result in "bits".
*/
static void appendLengthInfo(int numLetters, Version version, Mode mode,
BitArray bits) throws WriterException {
int numBits = mode.getCharacterCountBits(version);
if (numLetters >= (1 << numBits)) {
throw new WriterException(numLetters + " is bigger than "
+ ((1 << numBits) - 1));
}
bits.appendBits(numLetters, numBits);
}
示例8: calculateBitsNeeded
import com.google.zxing.qrcode.decoder.Mode; //导入方法依赖的package包/类
private static int calculateBitsNeeded(Mode mode,
BitArray headerBits,
BitArray dataBits,
Version version) {
return headerBits.getSize() + mode.getCharacterCountBits(version) + dataBits.getSize();
}