public class Url extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Url(UrlMarker urlMarker) |
| Modifier and Type | Method and Description |
|---|---|
static Url |
create(String url)
Returns a url given a single url.
|
String |
getFragment() |
String |
getFullUrl()
Note that this includes the fragment
|
String |
getFullUrlWithoutFragment() |
String |
getHost() |
byte[] |
getHostBytes()
Always returns null for non normalized urls.
|
String |
getOriginalUrl() |
String |
getPassword() |
String |
getPath() |
int |
getPort()
port = 0 means it hasn't been set yet.
|
String |
getQuery() |
protected String |
getRawHost() |
protected String |
getRawPath() |
String |
getScheme() |
protected UrlMarker |
getUrlMarker() |
String |
getUsername() |
NormalizedUrl |
normalize()
Returns a normalized url given a url object
|
protected void |
setRawHost(String host) |
protected void |
setRawPath(String path) |
String |
toString() |
protected Url(UrlMarker urlMarker)
public static Url create(String url) throws MalformedURLException
MalformedURLExceptionpublic NormalizedUrl normalize()
public String getFullUrl()
public String getFullUrlWithoutFragment()
public String getScheme()
public String getUsername()
public String getPassword()
public String getHost()
public int getPort()
public String getPath()
public String getQuery()
public String getFragment()
public byte[] getHostBytes()
public String getOriginalUrl()
protected void setRawPath(String path)
protected void setRawHost(String host)
protected String getRawPath()
protected String getRawHost()
protected UrlMarker getUrlMarker()
Copyright © 2016. All rights reserved.