Package org.asynchttpclient.uri
Class Uri
- java.lang.Object
-
- org.asynchttpclient.uri.Uri
-
public class Uri extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Uricreate(@Nullable Uri context, String originalUrl)static Uricreate(String originalUrl)booleanequals(Object obj)StringgetAuthority()StringgetBaseUrl()intgetExplicitPort()@Nullable StringgetFragment()StringgetHost()StringgetNonEmptyPath()StringgetPath()intgetPort()@Nullable StringgetQuery()StringgetScheme()intgetSchemeDefaultPort()@Nullable StringgetUserInfo()inthashCode()booleanisSameBase(Uri other)booleanisSecured()booleanisWebSocket()StringtoBaseUrl()StringtoFullUrl()URItoJavaNetURI()StringtoRelativeUrl()StringtoString()StringtoUrl()static voidvalidateSupportedScheme(Uri uri)UriwithNewQuery(@Nullable String newQuery)UriwithNewScheme(String newScheme)
-
-
-
Field Detail
-
HTTP
public static final String HTTP
- See Also:
- Constant Field Values
-
HTTPS
public static final String HTTPS
- See Also:
- Constant Field Values
-
WS
public static final String WS
- See Also:
- Constant Field Values
-
WSS
public static final String WSS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getQuery
@Nullable public @Nullable String getQuery()
-
getPath
public String getPath()
-
getUserInfo
@Nullable public @Nullable String getUserInfo()
-
getPort
public int getPort()
-
getScheme
public String getScheme()
-
getHost
public String getHost()
-
getFragment
@Nullable public @Nullable String getFragment()
-
isSecured
public boolean isSecured()
-
isWebSocket
public boolean isWebSocket()
-
toJavaNetURI
public URI toJavaNetURI() throws URISyntaxException
- Throws:
URISyntaxException
-
getExplicitPort
public int getExplicitPort()
-
getSchemeDefaultPort
public int getSchemeDefaultPort()
-
toUrl
public String toUrl()
-
toBaseUrl
public String toBaseUrl()
- Returns:
- [scheme]://[hostname](:[port])/path. Port is omitted if it matches the scheme's default one.
-
toRelativeUrl
public String toRelativeUrl()
-
toFullUrl
public String toFullUrl()
-
getBaseUrl
public String getBaseUrl()
-
getAuthority
public String getAuthority()
-
isSameBase
public boolean isSameBase(Uri other)
-
getNonEmptyPath
public String getNonEmptyPath()
-
validateSupportedScheme
public static void validateSupportedScheme(Uri uri)
-
-