Package org.h2gis.utilities
Class URIUtilities
- java.lang.Object
-
- org.h2gis.utilities.URIUtilities
-
public class URIUtilities extends Object
Utility class in order to manage URI- Author:
- Nicolas Fortin
-
-
Constructor Summary
Constructors Constructor Description URIUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FilefileFromString(String fileName)Get a File from the specified file name.static StringgetConcatenatedParameters(Map<String,String> parameters, String... keys)Create the Query part of an URIstatic Map<String,String>getQueryKeyValuePairs(URI uri)Read the Query part of an URI.static URIrelativize(URI base, URI target)Enhanced version of URI.relativize, the target can now be in parent folder of base URI.
-
-
-
Field Detail
-
ENCODING
public static final String ENCODING
Encoding- See Also:
- Constant Field Values
-
-
Method Detail
-
getQueryKeyValuePairs
public static Map<String,String> getQueryKeyValuePairs(URI uri) throws UnsupportedEncodingException
Read the Query part of an URI.- Parameters:
uri- URI to split- Returns:
- Key/Value pairs of query, the key is lowercase and value may be null
- Throws:
UnsupportedEncodingException
-
getConcatenatedParameters
public static String getConcatenatedParameters(Map<String,String> parameters, String... keys)
Create the Query part of an URI- Parameters:
parameters- Parameters to readkeys- map property to read- Returns:
- Query part of an URI
-
relativize
public static URI relativize(URI base, URI target)
Enhanced version of URI.relativize, the target can now be in parent folder of base URI.- Parameters:
base- Base uri, location from where to relativize.target- Target uri, final destination of returned URI.- Returns:
- Non-absolute URI, or target if target scheme is different than base scheme.
-
-