MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / getProtocol

Method getProtocol

CodenameOne/src/com/codename1/io/URL.java:82–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 }
81
82 public String getProtocol() {
83 String s = u.toASCIIString();
84 if (s.startsWith("https")) {
85 return "https";
86 }
87 if (s.startsWith("file")) {
88 return "file";
89 }
90 return "http";
91 }
92
93 public String getHost() {
94 return u.getHost();

Callers 3

openConnectionMethod · 0.95
parsesUrlComponentsMethod · 0.95
getFontFileMethod · 0.95

Calls 2

startsWithMethod · 0.95
toASCIIStringMethod · 0.45

Tested by 1

parsesUrlComponentsMethod · 0.76