public class UrlSugar extends Object
Url
(Url.UrlBuilder
) creation
and tweaking:
import static org.refcodes.net.UrlSugar.*;
Constructor and Description |
---|
UrlSugar() |
Modifier and Type | Method and Description |
---|---|
Url.UrlBuilder |
toUrl()
Creates an empty
Url.UrlBuilder , make sure to set required attributes
for a valid URL. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort,
String aPath)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
String aPath)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
String aPath,
FormFields aQueryFields)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(org.refcodes.data.Scheme aScheme,
String aHost,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aUrl)
Constructs an
Url.UrlBuilder from the provided URL String . |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
int aPort)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
int aPort,
String aPath)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
int aPort,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
String aPath)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
String aPath,
FormFields aQueryFields)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(String aProtocol,
String aHost,
String aPath,
FormFields aQueryFields,
String aFragment)
Constructs an
Url.UrlBuilder with the common attributes. |
Url.UrlBuilder |
toUrl(URL aURL)
Constructs an
Url.UrlBuilder from the provided URL instance. |
public Url.UrlBuilder toUrl()
Url.UrlBuilder
, make sure to set required attributes
for a valid URL.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aUrl) throws MalformedURLException
Url.UrlBuilder
from the provided URL String
.aUrl
- The URL String
to be parsed.Url.UrlBuilder
instance.MalformedURLException
- in case the provided URL is considered
being malformed.public Url.UrlBuilder toUrl(URL aURL)
Url.UrlBuilder
from the provided URL
instance.aURL
- The URL
to be used.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL is to
point to.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, int aPort)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, int aPort, String aPath)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL is to
point to.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, int aPort, String aPath, FormFields aQueryFields, String aFragment)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPort
- The port to be used when connecting to the host.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL is to
point to.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, FormFields aQueryFields)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(org.refcodes.data.Scheme aScheme, String aHost, String aPath, FormFields aQueryFields, String aFragment)
Url.UrlBuilder
with the common attributes.aScheme
- The Scheme
(e.g. HTTP or HTTPS) to be used for the
destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, String aPath)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL is to
point to.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, String aPath, FormFields aQueryFields)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.Url.UrlBuilder
instance.public Url.UrlBuilder toUrl(String aProtocol, String aHost, String aPath, FormFields aQueryFields, String aFragment)
Url.UrlBuilder
with the common attributes.aProtocol
- The protocol String
(e.g. "http://" or
"https://") to be used for the destination URL.aHost
- The host to which the destination URL is to point to.aPath
- The path on the host to which the base destination URL is to
point to.aQueryFields
- The Query-Fields to be used for the HTTP
Query-String.aFragment
- The fragment to be set.Url.UrlBuilder
instance.Copyright © 2018. All rights reserved.