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


Java FieldEncoding类代码示例

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


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

示例1: decode

import com.squareup.wire.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的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.FieldEncoding; //导入依赖的package包/类
@Override
public VersionOne 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.i(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,代码行数:18,代码来源:VersionOne.java

示例14: decode

import com.squareup.wire.FieldEncoding; //导入依赖的package包/类
@Override
public Location 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.path.add(ProtoAdapter.INT32.decode(reader)); break;
      case 2: builder.span.add(ProtoAdapter.INT32.decode(reader)); break;
      case 3: builder.leading_comments(ProtoAdapter.STRING.decode(reader)); break;
      case 4: builder.trailing_comments(ProtoAdapter.STRING.decode(reader)); break;
      case 6: builder.leading_detached_comments.add(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,代码行数:22,代码来源:SourceCodeInfo.java

示例15: decode

import com.squareup.wire.FieldEncoding; //导入依赖的package包/类
@Override
public EnumValueDescriptorProto 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.name(ProtoAdapter.STRING.decode(reader)); break;
      case 2: builder.number(ProtoAdapter.INT32.decode(reader)); break;
      case 3: builder.options(EnumValueOptions.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,代码行数:20,代码来源:EnumValueDescriptorProto.java


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