Modifier and Type | Class and Description |
---|---|
static class |
UrlWrapper.Status
List of HTTP reponse status codes.
|
Modifier and Type | Field and Description |
---|---|
private URL |
url
Holds URL persistently.
|
Modifier | Constructor and Description |
---|---|
private |
UrlWrapper(URL urlParam)
Private constructor requires factory construction.
|
Modifier and Type | Method and Description |
---|---|
UrlWrapper.Status |
getResponse()
Returns http status response.
|
URL |
getUrl()
Returns pre-validated URL.
|
static boolean |
isValidUrl(String urlParam)
Checks String if it is a valid URL.
|
static UrlWrapper |
newUrlWrapper(String urlStringParam)
Returns UrlWrapper instance.
|
String |
toString()
Provides cleartext value.
|
private static URL |
toValidatedUrl(String newUrl)
Converts String into URL.
|
private URL url
private UrlWrapper(URL urlParam)
urlParam
- URL to be wrappedpublic static UrlWrapper newUrlWrapper(String urlStringParam)
urlStringParam
- Url to createIllegalArgumentException
- if URL is invalid.private static URL toValidatedUrl(String newUrl)
UrlValidator
.newUrl
- URL to validateIllegalArgumentException
- if URL is not valid or
if java.net.UrlWrapper returns malformed URL exception.public static boolean isValidUrl(String urlParam)
urlParam
- URL to checkpublic URL getUrl()
public String toString()
public UrlWrapper.Status getResponse() throws IOException
IOException
- on any input/output errorCopyright © 2018. All rights reserved.