Uri implements Serializable { public String getRawUriString() { if (isRingId()) { return RING_URI_SCHEME + getRawRingId(); } StringBuilder builder = new StringBuilder(64); if (getUsername() != null && !getUsername().isEmpty()) { builder.append(getUsername()).append("@"); } if (getHost() != null) { builder.append(getHost()); } if (getPort() != null && !getPort().isEmpty()) { builder.append(":").append(getPort()); } return builder.toString(); } Uri(String uri); String getRawUriString(); String getUriString(); @Override String toString(); boolean isSingleIp(); boolean isRingId(); String getRawRingId(); String getUri(); @Override boolean equals(Object o); boolean isEmpty(); static boolean isIpAddress(String ipAddress); String getDisplayName(); void setDisplayName(String displayName); String getScheme(); void setScheme(String scheme); String getUsername(); void setUsername(String username); String getHost(); void setHost(String host); String getPort(); void setPort(String port); static final String RING_URI_SCHEME; static final String JAMI_URI_SCHEME; }
@Test public void testGoodRawString() { String uri = "ring:1234567890123456789012345678901234567890"; Uri test = new Uri(uri); assertTrue(test.getRawUriString().contentEquals(uri)); }