当前位置: 首页>>代码示例>>Java>>正文


Java Mode.getCharacterCountBits方法代码示例

本文整理汇总了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);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:11,代码来源:Encoder.java

示例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);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:9,代码来源:Encoder.java

示例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);
}
 
开发者ID:Ag47,项目名称:TrueTone,代码行数:11,代码来源:Encoder.java

示例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;
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:13,代码来源:Encoder.java

示例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);
}
 
开发者ID:cping,项目名称:RipplePower,代码行数:11,代码来源:Encoder.java

示例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);
}
 
开发者ID:emdete,项目名称:Simplicissimus,代码行数:12,代码来源:Encoder.java

示例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);
}
 
开发者ID:Tinker-S,项目名称:FaceBarCodeDemo,代码行数:13,代码来源:Encoder.java

示例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();
}
 
开发者ID:10045125,项目名称:QrCode,代码行数:7,代码来源:Encoder.java


注:本文中的com.google.zxing.qrcode.decoder.Mode.getCharacterCountBits方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。