@Test public void testIsWebsocket() { String url = "http: Uri uri = Uri.create(url); assertFalse(uri.isWebSocket(), "isWebSocket should return false for http url"); url = "https: uri = Uri.create(url); assertFalse(uri.isWebSocket(), "isWebSocket should return false for https url"); url = "ws: uri = Uri.create(url); assertTrue(uri.isWebSocket(), "isWebSocket should return true for ws url"); url = "wss: uri = Uri.create(url); assertTrue(uri.isWebSocket(), "isWebSocket should return true for wss url"); }
public boolean isWebSocket() { return webSocket; }
Uri { public boolean isWebSocket() { return webSocket; } }
Uri { public boolean isWebSocket() { return webSocket; } Uri(String scheme,
             String userInfo,
             String host,
             int port,
             String path,
             String query,
             String fragment); }
Uri { public boolean isWebSocket() { return webSocket; } Uri(String scheme,
             String userInfo,
             String host,
             int port,
             String path,
             String query,
             String fragment); static Uri create(String originalUrl); static Uri create(Uri context, final String originalUrl); String getQuery(); String getPath(); String getUserInfo(); int getPort(); String getScheme(); String getHost(); String getFragment(); boolean isSecured(); boolean isWebSocket(); URI toJavaNetURI(); int getExplicitPort(); int getSchemeDefaultPort(); String toUrl(); String toBaseUrl(); String toRelativeUrl(); String toFullUrl(); String getBaseUrl(); String getAuthority(); boolean isSameBase(Uri other); String getNonEmptyPath(); @Override String toString(); Uri withNewScheme(String newScheme); Uri withNewQuery(String newQuery); @Override int hashCode(); @Override boolean equals(Object obj); static void validateSupportedScheme(Uri uri); }
Uri { public boolean isWebSocket() { return webSocket; } Uri(String scheme,
             String userInfo,
             String host,
             int port,
             String path,
             String query,
             String fragment); static Uri create(String originalUrl); static Uri create(Uri context, final String originalUrl); String getQuery(); String getPath(); String getUserInfo(); int getPort(); String getScheme(); String getHost(); String getFragment(); boolean isSecured(); boolean isWebSocket(); URI toJavaNetURI(); int getExplicitPort(); int getSchemeDefaultPort(); String toUrl(); String toBaseUrl(); String toRelativeUrl(); String toFullUrl(); String getBaseUrl(); String getAuthority(); boolean isSameBase(Uri other); String getNonEmptyPath(); @Override String toString(); Uri withNewScheme(String newScheme); Uri withNewQuery(String newQuery); @Override int hashCode(); @Override boolean equals(Object obj); static void validateSupportedScheme(Uri uri); static final String HTTP; static final String HTTPS; static final String WS; static final String WSS; }