MCPcopy Create free account
hub / github.com/ReadyTalk/avian / toExternalForm

Method toExternalForm

classpath/java/net/URLStreamHandler.java:65–78  ·  view source on GitHub ↗
(URL url)

Source from the content-addressed store, hash-verified

63 }
64
65 protected String toExternalForm(URL url) {
66 StringBuilder sb = new StringBuilder();
67 sb.append(url.getProtocol()).append(":");
68 if (url.getHost() != null) {
69 sb.append("//").append(url.getHost());
70 if (url.getPort() >= 0) {
71 sb.append(":").append(url.getPort());
72 }
73 }
74 if (url.getFile() != null) {
75 sb.append(url.getFile());
76 }
77 return sb.toString();
78 }
79
80 protected abstract URLConnection openConnection(URL url) throws IOException;
81}

Callers 1

toStringMethod · 0.80

Calls 7

appendMethod · 0.95
toStringMethod · 0.95
getProtocolMethod · 0.80
getHostMethod · 0.80
getFileMethod · 0.80
appendMethod · 0.65
getPortMethod · 0.45

Tested by

no test coverage detected