Package com.bastiaanjansen.otp.helpers
Class URIHelper
- java.lang.Object
-
- com.bastiaanjansen.otp.helpers.URIHelper
-
public class URIHelper extends Object
A URI utility class with helper methods- Author:
- Bastiaan Jansen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URIcreateURI(String scheme, String host, String path, Map<String,String> query)Create a URI based on a scheme, host, path and query itemsstatic Stringencode(String value)static Map<String,String>queryItems(URI uri)Get a map of query items from URI
-
-
-
Field Detail
-
DIGITS
public static final String DIGITS
- See Also:
- Constant Field Values
-
SECRET
public static final String SECRET
- See Also:
- Constant Field Values
-
ALGORITHM
public static final String ALGORITHM
- See Also:
- Constant Field Values
-
PERIOD
public static final String PERIOD
- See Also:
- Constant Field Values
-
COUNTER
public static final String COUNTER
- See Also:
- Constant Field Values
-
ISSUER
public static final String ISSUER
- See Also:
- Constant Field Values
-
-
Method Detail
-
queryItems
public static Map<String,String> queryItems(URI uri)
Get a map of query items from URI- Parameters:
uri- to get query items from- Returns:
- map of query items from URI
-
createURI
public static URI createURI(String scheme, String host, String path, Map<String,String> query) throws URISyntaxException
Create a URI based on a scheme, host, path and query items- Parameters:
scheme- of URIhost- of URIpath- of URIquery- of URI- Returns:
- created URI
- Throws:
URISyntaxException- when URI cannot be created
-
-