本文整理汇总了Java中com.google.protobuf.nano.CodedOutputByteBufferNano.writeRawVarint32方法的典型用法代码示例。如果您正苦于以下问题:Java CodedOutputByteBufferNano.writeRawVarint32方法的具体用法?Java CodedOutputByteBufferNano.writeRawVarint32怎么用?Java CodedOutputByteBufferNano.writeRawVarint32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.protobuf.nano.CodedOutputByteBufferNano
的用法示例。
在下文中一共展示了CodedOutputByteBufferNano.writeRawVarint32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTo
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
public final void writeTo(CodedOutputByteBufferNano paramCodedOutputByteBufferNano)
throws IOException
{
if ((this.componentIdToValidate != null) && (this.componentIdToValidate.length > 0))
{
int i = 0;
for (int j = 0; j < this.componentIdToValidate.length; j++) {
i += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.componentIdToValidate[j]);
}
paramCodedOutputByteBufferNano.writeRawVarint32(10);
paramCodedOutputByteBufferNano.writeRawVarint32(i);
for (int k = 0; k < this.componentIdToValidate.length; k++) {
paramCodedOutputByteBufferNano.writeInt32NoTag(this.componentIdToValidate[k]);
}
}
if (this.validateAllElements) {
paramCodedOutputByteBufferNano.writeBool(2, this.validateAllElements);
}
if (!Arrays.equals(this.requestToken, WireFormatNano.EMPTY_BYTES)) {
paramCodedOutputByteBufferNano.writeBytes(5, this.requestToken);
}
super.writeTo(paramCodedOutputByteBufferNano);
}
示例2: writeTo
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
public final void writeTo(CodedOutputByteBufferNano paramCodedOutputByteBufferNano)
throws IOException
{
if (this.length != 0) {
paramCodedOutputByteBufferNano.writeInt32(1, this.length);
}
if (this.firstDigits != 0L) {
paramCodedOutputByteBufferNano.writeInt64(2, this.firstDigits);
}
if ((this.middleDigits != null) && (this.middleDigits.length > 0))
{
int m = 0;
for (int n = 0; n < this.middleDigits.length; n++) {
m += CodedOutputByteBufferNano.computeRawVarint64Size(this.middleDigits[n]);
}
paramCodedOutputByteBufferNano.writeRawVarint32(26);
paramCodedOutputByteBufferNano.writeRawVarint32(m);
for (int i1 = 0; i1 < this.middleDigits.length; i1++) {
paramCodedOutputByteBufferNano.writeRawVarint64(this.middleDigits[i1]);
}
}
if ((this.lastDigitBitset != null) && (this.lastDigitBitset.length > 0))
{
int i = 0;
for (int j = 0; j < this.lastDigitBitset.length; j++) {
i += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.lastDigitBitset[j]);
}
paramCodedOutputByteBufferNano.writeRawVarint32(34);
paramCodedOutputByteBufferNano.writeRawVarint32(i);
for (int k = 0; k < this.lastDigitBitset.length; k++) {
paramCodedOutputByteBufferNano.writeInt32NoTag(this.lastDigitBitset[k]);
}
}
super.writeTo(paramCodedOutputByteBufferNano);
}
示例3: writeTo
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
public final void writeTo(CodedOutputByteBufferNano paramCodedOutputByteBufferNano)
throws IOException
{
if (this.minLength != 0) {
paramCodedOutputByteBufferNano.writeInt32(1, this.minLength);
}
if (this.maxLength != 0) {
paramCodedOutputByteBufferNano.writeInt32(2, this.maxLength);
}
if (this.keyboardLayout != 0) {
paramCodedOutputByteBufferNano.writeInt32(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) {
paramCodedOutputByteBufferNano.writeMessage(5, localValidation);
}
}
}
if (!this.initialValue.equals("")) {
paramCodedOutputByteBufferNano.writeString(6, this.initialValue);
}
if (this.isMasked) {
paramCodedOutputByteBufferNano.writeBool(8, this.isMasked);
}
if (this.templateFormattingScheme != null) {
paramCodedOutputByteBufferNano.writeMessage(14, this.templateFormattingScheme);
}
if ((this.keyboardLayoutVariation != null) && (this.keyboardLayoutVariation.length > 0))
{
int i = 0;
for (int j = 0; j < this.keyboardLayoutVariation.length; j++) {
i += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.keyboardLayoutVariation[j]);
}
paramCodedOutputByteBufferNano.writeRawVarint32(122);
paramCodedOutputByteBufferNano.writeRawVarint32(i);
for (int k = 0; k < this.keyboardLayoutVariation.length; k++) {
paramCodedOutputByteBufferNano.writeRawVarint32(this.keyboardLayoutVariation[k]);
}
}
super.writeTo(paramCodedOutputByteBufferNano);
}