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, setTimeout
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
defaultName
public HTTPLocation(URI uri, String username, String password) throws URISyntaxException
URISyntaxException
public 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.MalformedURLException
public 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.MalformedURLException
public okhttp3.HttpUrl getHttpUrl()
HttpUrl
public 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()
Location
Copyright © 2015–2022 SciJava. All rights reserved.