本文整理汇总了Java中com.google.protobuf.nano.CodedOutputByteBufferNano.computeRawVarint32Size方法的典型用法代码示例。如果您正苦于以下问题:Java CodedOutputByteBufferNano.computeRawVarint32Size方法的具体用法?Java CodedOutputByteBufferNano.computeRawVarint32Size怎么用?Java CodedOutputByteBufferNano.computeRawVarint32Size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.protobuf.nano.CodedOutputByteBufferNano
的用法示例。
在下文中一共展示了CodedOutputByteBufferNano.computeRawVarint32Size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if ((this.componentIdToValidate != null) && (this.componentIdToValidate.length > 0))
{
int j = 0;
for (int k = 0; k < this.componentIdToValidate.length; k++) {
j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.componentIdToValidate[k]);
}
i = 1 + (i + j) + CodedOutputByteBufferNano.computeRawVarint32Size(j);
}
if (this.validateAllElements) {
i += 1 + CodedOutputByteBufferNano.computeTagSize(2);
}
if (!Arrays.equals(this.requestToken, WireFormatNano.EMPTY_BYTES)) {
i += CodedOutputByteBufferNano.computeBytesSize(5, this.requestToken);
}
return i;
}
示例2: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if (this.minLength != 0) {
i += CodedOutputByteBufferNano.computeInt32Size(1, this.minLength);
}
if (this.maxLength != 0) {
i += CodedOutputByteBufferNano.computeInt32Size(2, this.maxLength);
}
if (this.keyboardLayout != 0) {
i += CodedOutputByteBufferNano.computeInt32Size(4, this.keyboardLayout);
}
if ((this.validation != null) && (this.validation.length > 0)) {
for (int m = 0; m < this.validation.length; m++)
{
Validation localValidation = this.validation[m];
if (localValidation != null) {
i += CodedOutputByteBufferNano.computeMessageSize(5, localValidation);
}
}
}
if (!this.initialValue.equals("")) {
i += CodedOutputByteBufferNano.computeStringSize(6, this.initialValue);
}
if (this.isMasked) {
i += 1 + CodedOutputByteBufferNano.computeTagSize(8);
}
if (this.templateFormattingScheme != null) {
i += CodedOutputByteBufferNano.computeMessageSize(14, this.templateFormattingScheme);
}
if ((this.keyboardLayoutVariation != null) && (this.keyboardLayoutVariation.length > 0))
{
int j = 0;
for (int k = 0; k < this.keyboardLayoutVariation.length; k++) {
j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.keyboardLayoutVariation[k]);
}
i = 1 + (i + j) + CodedOutputByteBufferNano.computeRawVarint32Size(j);
}
return i;
}
示例3: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if ((this.prefixSet != null) && (this.prefixSet.length > 0)) {
for (int m = 0; m < this.prefixSet.length; m++)
{
CardFormOuterClass.PanPrefixSet localPanPrefixSet = this.prefixSet[m];
if (localPanPrefixSet != null) {
i += CodedOutputByteBufferNano.computeMessageSize(1, localPanPrefixSet);
}
}
}
if (!Arrays.equals(this.panCategoryToken, WireFormatNano.EMPTY_BYTES)) {
i += CodedOutputByteBufferNano.computeBytesSize(2, this.panCategoryToken);
}
if (this.format != null) {
i += CodedOutputByteBufferNano.computeMessageSize(3, this.format);
}
if (this.logoIndex != 0) {
i += CodedOutputByteBufferNano.computeInt32Size(4, this.logoIndex);
}
if ((this.cardSubformIndex != null) && (this.cardSubformIndex.length > 0))
{
int j = 0;
for (int k = 0; k < this.cardSubformIndex.length; k++) {
j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.cardSubformIndex[k]);
}
i = 1 + (i + j) + CodedOutputByteBufferNano.computeRawVarint32Size(j);
}
if (this.panChecksumType != 0) {
i += CodedOutputByteBufferNano.computeInt32Size(6, this.panChecksumType);
}
if (this.concealedVisibleDigitsCount != 0) {
i += CodedOutputByteBufferNano.computeInt32Size(7, this.concealedVisibleDigitsCount);
}
if (this.minLength != -1) {
i += CodedOutputByteBufferNano.computeInt32Size(8, this.minLength);
}
return i;
}