本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}