@Test void localIdentityFromString() { Identity id = Identity.random(); LocalIdentity localId = new LocalIdentity("0.0.0.0", 45000, id); LocalIdentity fromString = LocalIdentity.fromString("net:0.0.0.0:45000~shs:" + id.publicKeyAsBase64String()); assertEquals(fromString, localId); }
public static LocalIdentity fromString(String str) { Matcher result = regexpPattern.matcher(str); if (!result.matches()) { return null; } return new LocalIdentity( result.group(1), result.group(2), Identity.fromPublicKey(Signature.PublicKey.fromBytes(Bytes.fromBase64String(result.group(3))))); }
LocalIdentity { public static LocalIdentity fromString(String str) { Matcher result = regexpPattern.matcher(str); if (!result.matches()) { return null; } return new LocalIdentity( result.group(1), result.group(2), Identity.fromPublicKey(Signature.PublicKey.fromBytes(Bytes.fromBase64String(result.group(3))))); } }
LocalIdentity { public static LocalIdentity fromString(String str) { Matcher result = regexpPattern.matcher(str); if (!result.matches()) { return null; } return new LocalIdentity( result.group(1), result.group(2), Identity.fromPublicKey(Signature.PublicKey.fromBytes(Bytes.fromBase64String(result.group(3))))); } LocalIdentity(String ip, String port, Identity id);  LocalIdentity(String ip, int port, Identity id);  LocalIdentity(InetSocketAddress addr, Identity id); }
LocalIdentity { public static LocalIdentity fromString(String str) { Matcher result = regexpPattern.matcher(str); if (!result.matches()) { return null; } return new LocalIdentity( result.group(1), result.group(2), Identity.fromPublicKey(Signature.PublicKey.fromBytes(Bytes.fromBase64String(result.group(3))))); } LocalIdentity(String ip, String port, Identity id);  LocalIdentity(String ip, int port, Identity id);  LocalIdentity(InetSocketAddress addr, Identity id); static LocalIdentity fromString(String str); String toCanonicalForm(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
LocalIdentity { public static LocalIdentity fromString(String str) { Matcher result = regexpPattern.matcher(str); if (!result.matches()) { return null; } return new LocalIdentity( result.group(1), result.group(2), Identity.fromPublicKey(Signature.PublicKey.fromBytes(Bytes.fromBase64String(result.group(3))))); } LocalIdentity(String ip, String port, Identity id);  LocalIdentity(String ip, int port, Identity id);  LocalIdentity(InetSocketAddress addr, Identity id); static LocalIdentity fromString(String str); String toCanonicalForm(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }