@Test public void testSerialize() throws Exception { URLString url = new URLString("http: URLString roundtrip = roundTrip(url); assertEquals(url, roundtrip); assertEquals("http: url = new URLString("http: roundtrip = roundTrip(url); assertEquals(url, roundtrip); assertEquals("http: url = new URLString("http: roundtrip = roundTrip(url); assertEquals(url, roundtrip); assertEquals("http: }
@Override public String toString() { if (fullURL == null) { StringBuffer tempURL = new StringBuffer(); if (protocol != null) { tempURL.append(protocol); tempURL.append(":"); } if (username != null || host != null) { tempURL.append(" if (username != null) { tempURL.append(username); if (password != null) { tempURL.append(":"); tempURL.append(password); } tempURL.append("@"); } if (host != null) { tempURL.append(host); } if (port != -1) { tempURL.append(":"); tempURL.append(Integer.toString(port)); } if (file != null) { tempURL.append("/"); } } if (file != null) { tempURL.append(file); } if (ref != null) { tempURL.append("#"); tempURL.append(ref); } fullURL = tempURL.toString(); } return fullURL; }
URLString implements Serializable { @Override public String toString() { if (fullURL == null) { StringBuffer tempURL = new StringBuffer(); if (protocol != null) { tempURL.append(protocol); tempURL.append(":"); } if (username != null || host != null) { tempURL.append(" if (username != null) { tempURL.append(username); if (password != null) { tempURL.append(":"); tempURL.append(password); } tempURL.append("@"); } if (host != null) { tempURL.append(host); } if (port != -1) { tempURL.append(":"); tempURL.append(Integer.toString(port)); } if (file != null) { tempURL.append("/"); } } if (file != null) { tempURL.append(file); } if (ref != null) { tempURL.append("#"); tempURL.append(ref); } fullURL = tempURL.toString(); } return fullURL; } }
URLString implements Serializable { @Override public String toString() { if (fullURL == null) { StringBuffer tempURL = new StringBuffer(); if (protocol != null) { tempURL.append(protocol); tempURL.append(":"); } if (username != null || host != null) { tempURL.append(" if (username != null) { tempURL.append(username); if (password != null) { tempURL.append(":"); tempURL.append(password); } tempURL.append("@"); } if (host != null) { tempURL.append(host); } if (port != -1) { tempURL.append(":"); tempURL.append(Integer.toString(port)); } if (file != null) { tempURL.append("/"); } } if (file != null) { tempURL.append(file); } if (ref != null) { tempURL.append("#"); tempURL.append(ref); } fullURL = tempURL.toString(); } return fullURL; } protected  URLString();  URLString(String protocol, String host, int port, String file, String username, String password);  URLString(URL url);  URLString(File file);  URLString(String url); }
URLString implements Serializable { @Override public String toString() { if (fullURL == null) { StringBuffer tempURL = new StringBuffer(); if (protocol != null) { tempURL.append(protocol); tempURL.append(":"); } if (username != null || host != null) { tempURL.append(" if (username != null) { tempURL.append(username); if (password != null) { tempURL.append(":"); tempURL.append(password); } tempURL.append("@"); } if (host != null) { tempURL.append(host); } if (port != -1) { tempURL.append(":"); tempURL.append(Integer.toString(port)); } if (file != null) { tempURL.append("/"); } } if (file != null) { tempURL.append(file); } if (ref != null) { tempURL.append("#"); tempURL.append(ref); } fullURL = tempURL.toString(); } return fullURL; } protected  URLString();  URLString(String protocol, String host, int port, String file, String username, String password);  URLString(URL url);  URLString(File file);  URLString(String url); @Override String toString(); int getPort(); String getProtocol(); String getFile(); String getRef(); String getHost(); String getUsername(); String getPassword(); URL getURL(); @Override boolean equals(Object obj); @Override int hashCode(); }
URLString implements Serializable { @Override public String toString() { if (fullURL == null) { StringBuffer tempURL = new StringBuffer(); if (protocol != null) { tempURL.append(protocol); tempURL.append(":"); } if (username != null || host != null) { tempURL.append(" if (username != null) { tempURL.append(username); if (password != null) { tempURL.append(":"); tempURL.append(password); } tempURL.append("@"); } if (host != null) { tempURL.append(host); } if (port != -1) { tempURL.append(":"); tempURL.append(Integer.toString(port)); } if (file != null) { tempURL.append("/"); } } if (file != null) { tempURL.append(file); } if (ref != null) { tempURL.append("#"); tempURL.append(ref); } fullURL = tempURL.toString(); } return fullURL; } protected  URLString();  URLString(String protocol, String host, int port, String file, String username, String password);  URLString(URL url);  URLString(File file);  URLString(String url); @Override String toString(); int getPort(); String getProtocol(); String getFile(); String getRef(); String getHost(); String getUsername(); String getPassword(); URL getURL(); @Override boolean equals(Object obj); @Override int hashCode();  }