/** * <code>repeated .com.openwallet.core.protos.PeerAddress broadcast_by = 5;</code> */ public com.openwallet.core.protos.Protos.PeerAddress.Builder addBroadcastByBuilder() { return getBroadcastByFieldBuilder().addBuilder( com.openwallet.core.protos.Protos.PeerAddress.getDefaultInstance()); } /**
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, ipAddress_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, port_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt64(3, services_); } getUnknownFields().writeTo(output); }
InetAddress ip; try { ip = InetAddress.getByAddress(proto.getIpAddress().toByteArray()); } catch (UnknownHostException e) { throw new UnreadableWalletException("Peer IP address does not have the right length", e); int port = proto.getPort(); PeerAddress address = new PeerAddress(ip, port); address.setServices(BigInteger.valueOf(proto.getServices())); confidence.markBroadcastBy(address);
public com.openwallet.core.protos.Protos.PeerAddress buildPartial() { com.openwallet.core.protos.Protos.PeerAddress result = new com.openwallet.core.protos.Protos.PeerAddress(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.ipAddress_ = ipAddress_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.port_ = port_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.services_ = services_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasIpAddress()) { memoizedIsInitialized = 0; return false; } if (!hasPort()) { memoizedIsInitialized = 0; return false; } if (!hasServices()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, ipAddress_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, port_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, services_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public com.openwallet.core.protos.Protos.PeerAddress getDefaultInstanceForType() { return com.openwallet.core.protos.Protos.PeerAddress.getDefaultInstance(); }
/** * <code>required bytes ip_address = 1;</code> */ public Builder clearIpAddress() { bitField0_ = (bitField0_ & ~0x00000001); ipAddress_ = getDefaultInstance().getIpAddress(); onChanged(); return this; }
public Builder mergeFrom(com.openwallet.core.protos.Protos.PeerAddress other) { if (other == com.openwallet.core.protos.Protos.PeerAddress.getDefaultInstance()) return this; if (other.hasIpAddress()) { setIpAddress(other.getIpAddress()); } if (other.hasPort()) { setPort(other.getPort()); } if (other.hasServices()) { setServices(other.getServices()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>repeated .com.openwallet.core.protos.PeerAddress broadcast_by = 5;</code> */ public com.openwallet.core.protos.Protos.PeerAddress.Builder addBroadcastByBuilder( int index) { return getBroadcastByFieldBuilder().addBuilder( index, com.openwallet.core.protos.Protos.PeerAddress.getDefaultInstance()); } /**