The java.net.URL class has five methods to split a URL into its component parts. These are:
java.net.URL
public String getProtocol() public String getHost() public int getPort() public String getFile() public String getRef()