org.h2gis.utilities
Class URIUtility
java.lang.Object
org.h2gis.utilities.URIUtility
public class URIUtility
- extends Object
Utility class in order to manage URI
- Author:
- Nicolas Fortin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCODING
public static final String ENCODING
- See Also:
- Constant Field Values
URIUtility
public URIUtility()
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.
- Throws:
IllegalArgumentException
fileFromString
public static File fileFromString(String fileName)
- Parameters:
fileName - File name using Path or URI
- Returns:
- File path
Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.