本文整理汇总了Java中com.squareup.wire.ProtoWriter.writeBytes方法的典型用法代码示例。如果您正苦于以下问题:Java ProtoWriter.writeBytes方法的具体用法?Java ProtoWriter.writeBytes怎么用?Java ProtoWriter.writeBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.squareup.wire.ProtoWriter
的用法示例。
在下文中一共展示了ProtoWriter.writeBytes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, BgReadingMessage value) throws IOException {
if (value.timestamp != null) ProtoAdapter.SINT64.encodeWithTag(writer, 1, value.timestamp);
if (value.time_since_sensor_started != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 2, value.time_since_sensor_started);
if (value.raw_data != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 3, value.raw_data);
if (value.filtered_data != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 4, value.filtered_data);
if (value.age_adjusted_raw_value != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 5, value.age_adjusted_raw_value);
if (value.calibration_flag != null) ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.calibration_flag);
if (value.calculated_value != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 7, value.calculated_value);
if (value.filtered_calculated_value != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 8, value.filtered_calculated_value);
if (value.calculated_value_slope != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 9, value.calculated_value_slope);
if (value.a != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 30, value.a);
if (value.b != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 31, value.b);
if (value.c != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 32, value.c);
if (value.ra != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 33, value.ra);
if (value.rb != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 34, value.rb);
if (value.rc != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 35, value.rc);
if (value.uuid != null) ProtoAdapter.STRING.encodeWithTag(writer, 10, value.uuid);
if (value.calibration_uuid != null) ProtoAdapter.STRING.encodeWithTag(writer, 11, value.calibration_uuid);
if (value.sensor_uuid != null) ProtoAdapter.STRING.encodeWithTag(writer, 12, value.sensor_uuid);
if (value.ignoreforstats != null) ProtoAdapter.BOOL.encodeWithTag(writer, 13, value.ignoreforstats);
if (value.raw_calculated != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 14, value.raw_calculated);
if (value.hide_slope != null) ProtoAdapter.BOOL.encodeWithTag(writer, 15, value.hide_slope);
if (value.noise != null) ProtoAdapter.STRING.encodeWithTag(writer, 16, value.noise);
writer.writeBytes(value.unknownFields());
}
示例2: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, SimpleMessage value) throws IOException {
ProtoAdapter.INT32.encodeWithTag(writer, 1, value.optional_int32);
NestedMessage.ADAPTER.encodeWithTag(writer, 2, value.optional_nested_msg);
ExternalMessage.ADAPTER.encodeWithTag(writer, 3, value.optional_external_msg);
NestedEnum.ADAPTER.encodeWithTag(writer, 4, value.default_nested_enum);
ProtoAdapter.INT32.encodeWithTag(writer, 5, value.required_int32);
ProtoAdapter.DOUBLE.asRepeated().encodeWithTag(writer, 6, value.repeated_double);
ForeignEnum.ADAPTER.encodeWithTag(writer, 7, value.default_foreign_enum);
ForeignEnum.ADAPTER.encodeWithTag(writer, 8, value.no_default_foreign_enum);
ProtoAdapter.STRING.encodeWithTag(writer, 9, value.package_);
ProtoAdapter.STRING.encodeWithTag(writer, 10, value.result);
ProtoAdapter.STRING.encodeWithTag(writer, 11, value.other);
ProtoAdapter.STRING.encodeWithTag(writer, 12, value.o);
writer.writeBytes(value.unknownFields());
}
示例3: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, FrameEntity value) throws IOException {
ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.alpha);
Layout.ADAPTER.encodeWithTag(writer, 2, value.layout);
Transform.ADAPTER.encodeWithTag(writer, 3, value.transform);
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.clipPath);
ShapeEntity.ADAPTER.asRepeated().encodeWithTag(writer, 5, value.shapes);
writer.writeBytes(value.unknownFields());
}
示例4: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, MovieParams value) throws IOException {
ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.viewBoxWidth);
ProtoAdapter.FLOAT.encodeWithTag(writer, 2, value.viewBoxHeight);
ProtoAdapter.INT32.encodeWithTag(writer, 3, value.fps);
ProtoAdapter.INT32.encodeWithTag(writer, 4, value.frames);
writer.writeBytes(value.unknownFields());
}
示例5: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, Layout value) throws IOException {
ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.x);
ProtoAdapter.FLOAT.encodeWithTag(writer, 2, value.y);
ProtoAdapter.FLOAT.encodeWithTag(writer, 3, value.width);
ProtoAdapter.FLOAT.encodeWithTag(writer, 4, value.height);
writer.writeBytes(value.unknownFields());
}
示例6: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, RectArgs value) throws IOException {
ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.x);
ProtoAdapter.FLOAT.encodeWithTag(writer, 2, value.y);
ProtoAdapter.FLOAT.encodeWithTag(writer, 3, value.width);
ProtoAdapter.FLOAT.encodeWithTag(writer, 4, value.height);
ProtoAdapter.FLOAT.encodeWithTag(writer, 5, value.cornerRadius);
writer.writeBytes(value.unknownFields());
}
示例7: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, Transform value) throws IOException {
ProtoAdapter.FLOAT.encodeWithTag(writer, 1, value.a);
ProtoAdapter.FLOAT.encodeWithTag(writer, 2, value.b);
ProtoAdapter.FLOAT.encodeWithTag(writer, 3, value.c);
ProtoAdapter.FLOAT.encodeWithTag(writer, 4, value.d);
ProtoAdapter.FLOAT.encodeWithTag(writer, 5, value.tx);
ProtoAdapter.FLOAT.encodeWithTag(writer, 6, value.ty);
writer.writeBytes(value.unknownFields());
}
示例8: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, MovieEntity value) throws IOException {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.version);
MovieParams.ADAPTER.encodeWithTag(writer, 2, value.params);
images.encodeWithTag(writer, 3, value.images);
SpriteEntity.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.sprites);
writer.writeBytes(value.unknownFields());
}
示例9: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, BloodTestMessage value) throws IOException {
if (value.timestamp != null) ProtoAdapter.SINT64.encodeWithTag(writer, 1, value.timestamp);
if (value.mgdl != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 2, value.mgdl);
if (value.created_timestamp != null) ProtoAdapter.SINT64.encodeWithTag(writer, 3, value.created_timestamp);
if (value.state != null) ProtoAdapter.SINT64.encodeWithTag(writer, 4, value.state);
if (value.source != null) ProtoAdapter.STRING.encodeWithTag(writer, 5, value.source);
if (value.uuid != null) ProtoAdapter.STRING.encodeWithTag(writer, 6, value.uuid);
writer.writeBytes(value.unknownFields());
}
示例10: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, Talk value) throws IOException {
ProtoAdapter.FIXED32.encodeWithTag(writer, 1, value.id);
ProtoAdapter.FIXED64.encodeWithTag(writer, 2, value.date);
Room.ADAPTER.encodeWithTag(writer, 3, value.room);
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.title);
ProtoAdapter.STRING.encodeWithTag(writer, 5, value.speaker);
writer.writeBytes(value.unknownFields());
}
示例11: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, Dinosaur value) throws IOException {
if (value.name != null) ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name);
if (value.picture_urls != null) ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 2, value.picture_urls);
if (value.length_meters != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 3, value.length_meters);
if (value.mass_kilograms != null) ProtoAdapter.DOUBLE.encodeWithTag(writer, 4, value.mass_kilograms);
if (value.period != null) Period.ADAPTER.encodeWithTag(writer, 5, value.period);
writer.writeBytes(value.unknownFields());
}
示例12: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, Message value) throws IOException {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.unknownFields);
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.other);
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.o);
ProtoAdapter.STRING.encodeWithTag(writer, 4, value.result);
ProtoAdapter.STRING.encodeWithTag(writer, 5, value.hashCode);
ProtoAdapter.STRING.encodeWithTag(writer, 6, value.serialVersionUID_);
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.ADAPTER_);
ProtoAdapter.STRING.encodeWithTag(writer, 8, value.MESSAGE_OPTIONS_);
ProtoAdapter.STRING.encodeWithTag(writer, 9, value.this_);
ProtoAdapter.STRING.encodeWithTag(writer, 10, value.message);
writer.writeBytes(value.unknownFields());
}
示例13: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, MethodDescriptorProto value) throws IOException {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name);
ProtoAdapter.STRING.encodeWithTag(writer, 2, value.input_type);
ProtoAdapter.STRING.encodeWithTag(writer, 3, value.output_type);
MethodOptions.ADAPTER.encodeWithTag(writer, 4, value.options);
ProtoAdapter.BOOL.encodeWithTag(writer, 5, value.client_streaming);
ProtoAdapter.BOOL.encodeWithTag(writer, 6, value.server_streaming);
writer.writeBytes(value.unknownFields());
}
示例14: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, DescriptorProto value) throws IOException {
ProtoAdapter.STRING.encodeWithTag(writer, 1, value.name);
FieldDescriptorProto.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.field);
FieldDescriptorProto.ADAPTER.asRepeated().encodeWithTag(writer, 6, value.extension);
DescriptorProto.ADAPTER.asRepeated().encodeWithTag(writer, 3, value.nested_type);
EnumDescriptorProto.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.enum_type);
ExtensionRange.ADAPTER.asRepeated().encodeWithTag(writer, 5, value.extension_range);
OneofDescriptorProto.ADAPTER.asRepeated().encodeWithTag(writer, 8, value.oneof_decl);
MessageOptions.ADAPTER.encodeWithTag(writer, 7, value.options);
ReservedRange.ADAPTER.asRepeated().encodeWithTag(writer, 9, value.reserved_range);
ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 10, value.reserved_name);
writer.writeBytes(value.unknownFields());
}
示例15: encode
import com.squareup.wire.ProtoWriter; //导入方法依赖的package包/类
@Override
public void encode(ProtoWriter writer, EnumValueOptions value) throws IOException {
ProtoAdapter.BOOL.encodeWithTag(writer, 1, value.deprecated);
UninterpretedOption.ADAPTER.asRepeated().encodeWithTag(writer, 999, value.uninterpreted_option);
ProtoAdapter.INT32.encodeWithTag(writer, 70000, value.enum_value_option);
FooBar.More.ADAPTER.encodeWithTag(writer, 70001, value.complex_enum_value_option);
ProtoAdapter.BOOL.encodeWithTag(writer, 70002, value.foreign_enum_value_option);
writer.writeBytes(value.unknownFields());
}