public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, cmdNumber_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, data_); } getUnknownFields().writeTo(output); }
com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, cmdNumber_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, data_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd buildPartial() { skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd result = new skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.cmdNumber_ = cmdNumber_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.data_ = data_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd prototype) {
public skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd getDefaultInstanceForType() { return skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd.getDefaultInstance(); }
public static Builder newBuilder(skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
@Override public Demo.CDemoUserCmd parse(Source source) throws IOException { return Demo.CDemoUserCmd.newBuilder() .setCmdNumber(source.readFixedInt32()) .setData(ZeroCopy.wrap(readPacket(source))) .build(); } @Override
@Override public Demo.CDemoUserCmd parse(Source source) throws IOException { return Demo.CDemoUserCmd.newBuilder() .setCmdNumber(source.readFixedInt32()) .setData(ZeroCopy.wrap(readPacket(source))) .build(); } @Override
/** * <code>optional bytes data = 2;</code> */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000002); data_ = getDefaultInstance().getData(); onChanged(); return this; }
public Builder mergeFrom(skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd other) { if (other == skadistats.clarity.wire.common.proto.Demo.CDemoUserCmd.getDefaultInstance()) return this; if (other.hasCmdNumber()) { setCmdNumber(other.getCmdNumber()); } if (other.hasData()) { setData(other.getData()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }