public class HTTPLocation extends AbstractRemoteLocation
| Constructor and Description |
|---|
HTTPLocation(okhttp3.HttpUrl url)
Creates an HTTPLocation from an
HttpUrl. |
HTTPLocation(String url) |
HTTPLocation(String url,
String username,
String password) |
HTTPLocation(URI uri)
Creates an HTTPLocation from an URI.
|
HTTPLocation(URI uri,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
okhttp3.HttpUrl |
getHttpUrl()
gets the backing
HttpUrl |
String |
getName()
Gets a (typically short) name expressing this location.
|
URI |
getURI()
Gets the associated
URI, or null if this URL is not formatted
strictly according to to RFC2396 and cannot be converted to a URI. |
URL |
getURL()
Gets the associated
URL. |
getTimeout, setTimeoutequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdefaultNamepublic HTTPLocation(URI uri, String username, String password) throws URISyntaxException
URISyntaxExceptionpublic HTTPLocation(URI uri) throws URISyntaxException
uri - the uri of the locationURISyntaxException - if the uri can not be converted to an URL, or
the uri does not point to a HTTP(S) location.public HTTPLocation(okhttp3.HttpUrl url)
HttpUrl.url - the http url of the locationpublic HTTPLocation(String url, String username, String password) throws URISyntaxException, MalformedURLException
url - the urlURISyntaxException - If the given string violates RFC 2396, or does
not point to a HTTP(S) location.MalformedURLExceptionpublic HTTPLocation(String url) throws URISyntaxException, MalformedURLException
url - the urlURISyntaxException - If the given string violates RFC 2396, or does
not point to a HTTP(S) location.MalformedURLExceptionpublic okhttp3.HttpUrl getHttpUrl()
HttpUrlpublic URI getURI()
URI, or null if this URL is not formatted
strictly according to to RFC2396 and cannot be converted to a URI.public String getName()
LocationCopyright © 2015–2022 SciJava. All rights reserved.