public class ParsedURL extends Object
Constructor and Description |
---|
ParsedURL(String url)
Construct a parsed URL
|
Modifier and Type | Method and Description |
---|---|
String |
getFile()
Gets the file name of this
URL . |
String |
getHost()
Gets the host name of this
URL |
List<String> |
getMultiQueryParameter(String name) |
Map<String,List<String>> |
getMultiQueryParameters() |
Map<String,List<String>> |
getMultiQueryParameters(String... names) |
Map<String,List<String>> |
getMultiQueryParametersIgnoring(String... names) |
String |
getPath()
Gets the path part of this
URL . |
int |
getPort()
Gets the port number of this
URL . |
String |
getProtocol()
Gets the protocol name of this
URL . |
String |
getQuery()
Gets the query part of this
URL . |
String |
getQueryParameter(String name) |
Map<String,String> |
getQueryParameters() |
Map<String,String> |
getQueryParameters(String... names) |
Map<String,String> |
getQueryParametersIgnoring(String... names) |
String |
toString()
Returns the URL in full string form
|
public ParsedURL(String url)
url
- Stringpublic String toString()
public String getProtocol()
URL
.URL
.public String getHost()
URL
URL
.public int getPort()
URL
.public String getFile()
URL
. The returned file portion will be the same as
getPath()
, plus the concatenation of the value of getQuery()
, if any. If there is
no query portion, this method and getPath()
will return identical results.URL
, or an empty string if one does not existpublic String getPath()
URL
.URL
, or an empty string if one does not existpublic String getQuery()
URL
.URL
, or null
if one does not existpublic Map<String,String> getQueryParameters()
public Map<String,String> getQueryParameters(String... names)
names
- the query parameter names to includepublic Map<String,String> getQueryParametersIgnoring(String... names)
names
- the query parameter names to ignorepublic String getQueryParameter(String name)
public Map<String,List<String>> getMultiQueryParametersIgnoring(String... names)
Copyright © 2002-2021 Atlassian. All Rights Reserved.