@Test public void testGetURL() throws Exception { String httpURL = "http: URLString url = new URLString(httpURL); assertEquals(httpURL, url.getURL().toString()); String fileURL = "file: url = new URLString(fileURL); assertEquals("./config/adapter.xml", url.getURL().getFile()); String httpURL_2 = "http: url = new URLString(httpURL_2); assertEquals(httpURL, url.getURL().toString()); }
public URL getURL() throws MalformedURLException { if (PROTOCOL_FILE.equalsIgnoreCase(getProtocol()) || isEmpty(getProtocol())) { return new URL(getProtocol(), getHost(), getPort(), getFile()); } return new URL(getProtocol(), getHost(), getPort(), slashPrefix(getFile())); }
URLString implements Serializable { public URL getURL() throws MalformedURLException { if (PROTOCOL_FILE.equalsIgnoreCase(getProtocol()) || isEmpty(getProtocol())) { return new URL(getProtocol(), getHost(), getPort(), getFile()); } return new URL(getProtocol(), getHost(), getPort(), slashPrefix(getFile())); } }
URLString implements Serializable { public URL getURL() throws MalformedURLException { if (PROTOCOL_FILE.equalsIgnoreCase(getProtocol()) || isEmpty(getProtocol())) { return new URL(getProtocol(), getHost(), getPort(), getFile()); } return new URL(getProtocol(), getHost(), getPort(), slashPrefix(getFile())); } 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 { public URL getURL() throws MalformedURLException { if (PROTOCOL_FILE.equalsIgnoreCase(getProtocol()) || isEmpty(getProtocol())) { return new URL(getProtocol(), getHost(), getPort(), getFile()); } return new URL(getProtocol(), getHost(), getPort(), slashPrefix(getFile())); } 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 { public URL getURL() throws MalformedURLException { if (PROTOCOL_FILE.equalsIgnoreCase(getProtocol()) || isEmpty(getProtocol())) { return new URL(getProtocol(), getHost(), getPort(), getFile()); } return new URL(getProtocol(), getHost(), getPort(), slashPrefix(getFile())); } 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();  }