public class URLHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
escapeCharacter(String uri,
char c,
String to)
Locates characters 'c' in the scheme specific portion of a URI and
translates them into 'to'
|
static String |
escapeSpace(String uri) |
String |
getEverythingBeforeQuery()
Everything before the "query" part of the URL.
|
String |
getFragment()
Returns the "fragment" portion of the URL, e.g. the "#foo" part, or
"" if the URL has no fragment.
|
LinkedHashMap<String,String> |
getParameterMap()
Returns the query portion of the URL, broken up into individual key/value
pairs.
|
String |
getQuery()
Rturns the "query" portion of the URL, e.g. the
"?
|
String |
getURL()
Returns the entire URL.
|
void |
setEverythingBeforeQuery(String everythingBeforeQuery) |
void |
setFragment(String fragment)
Sets the "fragment" portion of the URL.
|
void |
setParameterMap(Map<String,String> parameterMap)
Sets the query portion of the URL.
|
void |
setQuery(String query)
Sets the "query" portion of the URL.
|
public URLHelper(String url)
public String getEverythingBeforeQuery()
public void setEverythingBeforeQuery(String everythingBeforeQuery)
public String getQuery()
public void setQuery(String query)
public String getFragment()
public void setFragment(String fragment)
fragment
- public String getURL()
public LinkedHashMap<String,String> getParameterMap()
public void setParameterMap(Map<String,String> parameterMap)
parameterMap
- a key/value mapping; these must already be escaped!Copyright © 2016 The Apache Software Foundation. All rights reserved.