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


Java CodedOutputByteBufferNano.computeUInt32Size方法代码示例

本文整理汇总了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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:15,代码来源:CsdClient.java

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

示例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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:33,代码来源:CriticReviewsResponse.java

示例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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:42,代码来源:PlayStore.java


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