本文整理汇总了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;未经允许,请勿转载。 |
请发表评论