|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openejb.util.URISupport
public class URISupport
Swiped verbatim from ActiveMQ... the URI kings. URI relativize(URI, URI) added afterwards to deal with the non-functional URI.relativize(URI) method
Nested Class Summary | |
---|---|
static class |
URISupport.CompositeData
|
Constructor Summary | |
---|---|
URISupport()
|
Method Summary | |
---|---|
static URI |
changeScheme(URI bindAddr,
String scheme)
|
static boolean |
checkParenthesis(String str)
|
static String |
createQueryString(Map options)
|
static URI |
createRemainingURI(URI originalURI,
Map params)
Creates a URI from the original URI and the remaining paramaters |
static URI |
createURIWithQuery(URI uri,
String query)
Creates a URI with the given query |
int |
indexOfParenthesisMatch(String str)
|
static URISupport.CompositeData |
parseComposite(URI uri)
|
static Map<String,String> |
parseParamters(URI uri)
|
static Map<String,String> |
parseQuery(String uri)
|
static URI |
relativize(URI a,
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 URI |
removeQuery(URI uri)
Removes any URI query from the given uri |
static String |
stripPrefix(String value,
String prefix)
|
static URI |
stripScheme(URI uri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URISupport()
Method Detail |
---|
public static URI relativize(URI a, URI b)
a
- b
-
public static Map<String,String> parseQuery(String uri) throws URISyntaxException
URISyntaxException
public static Map<String,String> parseParamters(URI uri) throws URISyntaxException
URISyntaxException
public static URI removeQuery(URI uri) throws URISyntaxException
URISyntaxException
public static URI createURIWithQuery(URI uri, String query) throws URISyntaxException
URISyntaxException
public static URISupport.CompositeData parseComposite(URI uri) throws URISyntaxException
URISyntaxException
public static String stripPrefix(String value, String prefix)
public static URI stripScheme(URI uri) throws URISyntaxException
URISyntaxException
public static String createQueryString(Map options) throws URISyntaxException
URISyntaxException
public static URI createRemainingURI(URI originalURI, Map params) throws URISyntaxException
URISyntaxException
public static URI changeScheme(URI bindAddr, String scheme) throws URISyntaxException
URISyntaxException
public static boolean checkParenthesis(String str)
public int indexOfParenthesisMatch(String str)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |