本文整理汇总了Java中com.google.protobuf.nano.CodedOutputByteBufferNano.computeUInt32Size方法的典型用法代码示例。如果您正苦于以下问题:Java CodedOutputByteBufferNano.computeUInt32Size方法的具体用法?Java CodedOutputByteBufferNano.computeUInt32Size怎么用?Java CodedOutputByteBufferNano.computeUInt32Size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.protobuf.nano.CodedOutputByteBufferNano
的用法示例。
在下文中一共展示了CodedOutputByteBufferNano.computeUInt32Size方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if ((this.hasName) || (!this.name.equals(""))) {
i += CodedOutputByteBufferNano.computeStringSize(1, this.name);
}
if (this.digests != null) {
i += CodedOutputByteBufferNano.computeMessageSize(2, this.digests);
}
if ((this.hasVerificationErrors) || (this.verificationErrors != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(3, this.verificationErrors);
}
return i;
}
示例2: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if ((this.hasMonth) || (this.month != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(1, this.month);
}
if ((this.hasDay) || (this.day != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(2, this.day);
}
return i;
}
示例3: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if ((this.hasTitle) || (!this.title.equals(""))) {
i += CodedOutputByteBufferNano.computeStringSize(1, this.title);
}
if (this.aggregateSentiment != null) {
i += CodedOutputByteBufferNano.computeMessageSize(2, this.aggregateSentiment);
}
if ((this.hasTotalNumReviews) || (this.totalNumReviews != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(3, this.totalNumReviews);
}
if ((this.hasPercentFavorable) || (this.percentFavorable != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(4, this.percentFavorable);
}
if ((this.hasSourceText) || (!this.sourceText.equals(""))) {
i += CodedOutputByteBufferNano.computeStringSize(5, this.sourceText);
}
if (this.source != null) {
i += CodedOutputByteBufferNano.computeMessageSize(6, this.source);
}
if ((this.review != null) && (this.review.length > 0)) {
for (int j = 0; j < this.review.length; j++)
{
Review localReview = this.review[j];
if (localReview != null) {
i += CodedOutputByteBufferNano.computeMessageSize(7, localReview);
}
}
}
return i;
}
示例4: computeSerializedSize
import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
int i = super.computeSerializedSize();
if ((this.hasUrl) || (!this.url.equals(""))) {
i += CodedOutputByteBufferNano.computeStringSize(1, this.url);
}
if ((this.hasClientLatencyMs) || (this.clientLatencyMs != 0L)) {
i += CodedOutputByteBufferNano.computeUInt64Size(2, this.clientLatencyMs);
}
if ((this.hasServerLatencyMs) || (this.serverLatencyMs != 0L)) {
i += CodedOutputByteBufferNano.computeUInt64Size(3, this.serverLatencyMs);
}
if ((this.hasNumAttempts) || (this.numAttempts != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(4, this.numAttempts);
}
if ((this.hasTimeoutMs) || (this.timeoutMs != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(5, this.timeoutMs);
}
if ((this.hasBackoffMultiplier) || (Float.floatToIntBits(this.backoffMultiplier) != Float.floatToIntBits(0.0F))) {
i += 4 + CodedOutputByteBufferNano.computeTagSize(6);
}
if ((this.hasWasSuccessful) || (this.wasSuccessful)) {
i += 1 + CodedOutputByteBufferNano.computeTagSize(7);
}
if ((this.startConnectionType != 0) || (this.hasStartConnectionType)) {
i += CodedOutputByteBufferNano.computeInt32Size(8, this.startConnectionType);
}
if ((this.endConnectionType != 0) || (this.hasEndConnectionType)) {
i += CodedOutputByteBufferNano.computeInt32Size(9, this.endConnectionType);
}
if ((this.hasResponseBodySizeBytes) || (this.responseBodySizeBytes != 0)) {
i += CodedOutputByteBufferNano.computeUInt32Size(10, this.responseBodySizeBytes);
}
if ((this.volleyErrorType != 0) || (this.hasVolleyErrorType)) {
i += CodedOutputByteBufferNano.computeInt32Size(11, this.volleyErrorType);
}
if ((this.hasCacheHit) || (this.cacheHit)) {
i += 1 + CodedOutputByteBufferNano.computeTagSize(12);
}
return i;
}