• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ProtoReader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.squareup.wire.ProtoReader的典型用法代码示例。如果您正苦于以下问题:Java ProtoReader类的具体用法?Java ProtoReader怎么用?Java ProtoReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProtoReader类属于com.squareup.wire包,在下文中一共展示了ProtoReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public Phone decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.number(ProtoAdapter.STRING.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:Phone.java


示例2: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public FrameEntity decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.alpha(ProtoAdapter.FLOAT.decode(reader)); break;
      case 2: builder.layout(Layout.ADAPTER.decode(reader)); break;
      case 3: builder.transform(Transform.ADAPTER.decode(reader)); break;
      case 4: builder.clipPath(ProtoAdapter.STRING.decode(reader)); break;
      case 5: builder.shapes.add(ShapeEntity.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:22,代码来源:FrameEntity.java


示例3: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public MovieParams decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.viewBoxWidth(ProtoAdapter.FLOAT.decode(reader)); break;
      case 2: builder.viewBoxHeight(ProtoAdapter.FLOAT.decode(reader)); break;
      case 3: builder.fps(ProtoAdapter.INT32.decode(reader)); break;
      case 4: builder.frames(ProtoAdapter.INT32.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:21,代码来源:MovieParams.java


示例4: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public Layout decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.x(ProtoAdapter.FLOAT.decode(reader)); break;
      case 2: builder.y(ProtoAdapter.FLOAT.decode(reader)); break;
      case 3: builder.width(ProtoAdapter.FLOAT.decode(reader)); break;
      case 4: builder.height(ProtoAdapter.FLOAT.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:21,代码来源:Layout.java


示例5: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public ShapeArgs decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.d(ProtoAdapter.STRING.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:18,代码来源:ShapeEntity.java


示例6: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public Transform decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.a(ProtoAdapter.FLOAT.decode(reader)); break;
      case 2: builder.b(ProtoAdapter.FLOAT.decode(reader)); break;
      case 3: builder.c(ProtoAdapter.FLOAT.decode(reader)); break;
      case 4: builder.d(ProtoAdapter.FLOAT.decode(reader)); break;
      case 5: builder.tx(ProtoAdapter.FLOAT.decode(reader)); break;
      case 6: builder.ty(ProtoAdapter.FLOAT.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:23,代码来源:Transform.java


示例7: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public MovieEntity decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.version(ProtoAdapter.STRING.decode(reader)); break;
      case 2: builder.params(MovieParams.ADAPTER.decode(reader)); break;
      case 3: builder.images.putAll(images.decode(reader)); break;
      case 4: builder.sprites.add(SpriteEntity.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:21,代码来源:MovieEntity.java


示例8: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public SpriteEntity decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.imageKey(ProtoAdapter.STRING.decode(reader)); break;
      case 2: builder.frames.add(FrameEntity.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:19,代码来源:SpriteEntity.java


示例9: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public Sample decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.x(ProtoAdapter.UINT32.decode(reader)); break;
      case 2: builder.y(ProtoAdapter.UINT32.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:sureshjoshi,项目名称:android-streaming-protobuf-example,代码行数:19,代码来源:Sample.java


示例10: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public BgReadingMultiMessage decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.bgreading_message.add(BgReadingMessage.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:18,代码来源:BgReadingMultiMessage.java


示例11: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public BloodTestMultiMessage decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.bloodtest_message.add(BloodTestMessage.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:18,代码来源:BloodTestMultiMessage.java


示例12: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public BloodTestMessage decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.timestamp(ProtoAdapter.SINT64.decode(reader)); break;
      case 2: builder.mgdl(ProtoAdapter.DOUBLE.decode(reader)); break;
      case 3: builder.created_timestamp(ProtoAdapter.SINT64.decode(reader)); break;
      case 4: builder.state(ProtoAdapter.SINT64.decode(reader)); break;
      case 5: builder.source(ProtoAdapter.STRING.decode(reader)); break;
      case 6: builder.uuid(ProtoAdapter.STRING.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:23,代码来源:BloodTestMessage.java


示例13: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public CollisionSubject decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.f(ProtoAdapter.STRING.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:18,代码来源:CollisionSubject.java


示例14: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public OuterMessage decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.outer_number_before(ProtoAdapter.INT32.decode(reader)); break;
      case 2: builder.embedded_message(EmbeddedMessage.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:19,代码来源:OuterMessage.java


示例15: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public EmbeddedMessage decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.inner_repeated_number.add(ProtoAdapter.INT32.decode(reader)); break;
      case 2: builder.inner_number_after(ProtoAdapter.INT32.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:19,代码来源:EmbeddedMessage.java


示例16: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public Moo decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.boo(ProtoAdapter.STRING.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:18,代码来源:Bar.java


示例17: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public Foo decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.moo(Bar.Baz.Moo.ADAPTER.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:18,代码来源:Foo.java


示例18: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public HeresAllTheDataRequest decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.data(ProtoAdapter.BYTES.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:18,代码来源:HeresAllTheDataRequest.java


示例19: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public HeresAllTheDataResponse decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.data(ProtoAdapter.BYTES.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:18,代码来源:HeresAllTheDataResponse.java


示例20: decode

import com.squareup.wire.ProtoReader; //导入依赖的package包/类
@Override
public LetsDataResponse decode(ProtoReader reader) throws IOException {
  Builder builder = new Builder();
  long token = reader.beginMessage();
  for (int tag; (tag = reader.nextTag()) != -1;) {
    switch (tag) {
      case 1: builder.data(ProtoAdapter.BYTES.decode(reader)); break;
      default: {
        FieldEncoding fieldEncoding = reader.peekFieldEncoding();
        Object value = fieldEncoding.rawProtoAdapter().decode(reader);
        builder.addUnknownField(tag, fieldEncoding, value);
      }
    }
  }
  reader.endMessage(token);
  return builder.build();
}
 
开发者ID:square,项目名称:wire,代码行数:18,代码来源:LetsDataResponse.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Context类代码示例发布时间:2022-05-22
下一篇:
Java ArffReader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap