public class URISupport
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
URISupport.CompositeData |
Constructor and Description |
---|
URISupport() |
Modifier and Type | Method and Description |
---|---|
static java.net.URI |
addParameters(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> newParameters)
This method adds new parameters to a URI.
|
static java.net.URI |
changeScheme(java.net.URI bindAddr,
java.lang.String scheme) |
static boolean |
checkParenthesis(java.lang.String str) |
static java.lang.String |
createQueryString(java.util.Map options) |
static java.net.URI |
createRemainingURI(java.net.URI originalURI,
java.util.Map params)
Creates a URI from the original URI and the remaining paramaters
|
static java.net.URI |
createURIWithQuery(java.net.URI uri,
java.lang.String query)
Creates a URI with the given query
|
int |
indexOfParenthesisMatch(java.lang.String str) |
static URISupport.CompositeData |
parseComposite(java.net.URI uri) |
static java.util.Map<java.lang.String,java.lang.String> |
parseParamters(java.net.URI uri) |
static java.util.Map<java.lang.String,java.lang.String> |
parseQuery(java.lang.String uri) |
static java.net.URI |
relativize(java.net.URI a,
java.net.URI b)
URI absoluteA = new URI("/Users/dblevins/work/openejb3/container/openejb-jee/apple/");
URI absoluteB = new URI("/Users/dblevins/work/openejb3/container/openejb-core/foo.jar");
URI relativeB = URISupport.relativize(absoluteA, absoluteB);
assertEquals("../../openejb-core/foo.jar", relativeB.toString());
URI resolvedB = absoluteA.resolve(relativeB);
assertTrue(resolvedB.equals(absoluteB));
|
static java.net.URI |
removeQuery(java.net.URI uri)
Removes any URI query from the given uri
|
static java.lang.String |
stripPrefix(java.lang.String value,
java.lang.String prefix) |
static java.net.URI |
stripScheme(java.net.URI uri) |
public static java.net.URI relativize(java.net.URI a, java.net.URI b)
a
- b
- public static java.util.Map<java.lang.String,java.lang.String> parseQuery(java.lang.String uri) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.util.Map<java.lang.String,java.lang.String> parseParamters(java.net.URI uri) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.net.URI removeQuery(java.net.URI uri) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.net.URI createURIWithQuery(java.net.URI uri, java.lang.String query) throws java.net.URISyntaxException
java.net.URISyntaxException
public static URISupport.CompositeData parseComposite(java.net.URI uri) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.lang.String stripPrefix(java.lang.String value, java.lang.String prefix)
public static java.net.URI stripScheme(java.net.URI uri) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.lang.String createQueryString(java.util.Map options) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.net.URI createRemainingURI(java.net.URI originalURI, java.util.Map params) throws java.net.URISyntaxException
java.net.URISyntaxException
public static java.net.URI changeScheme(java.net.URI bindAddr, java.lang.String scheme) throws java.net.URISyntaxException
java.net.URISyntaxException
public static boolean checkParenthesis(java.lang.String str)
public int indexOfParenthesisMatch(java.lang.String str)
public static java.net.URI addParameters(java.net.URI uri, java.util.Map<java.lang.String,java.lang.String> newParameters) throws java.net.URISyntaxException
uri
- The URI to add parameters tonewParameters
- The parameters to addjava.net.URISyntaxException
- If there is a syntax error with the provided URI.