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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description URIHelper() -
Method Summary
-
Field Details
-
DIGITS
- See Also:
- Constant Field Values
-
SECRET
- See Also:
- Constant Field Values
-
ALGORITHM
- See Also:
- Constant Field Values
-
PERIOD
- See Also:
- Constant Field Values
-
COUNTER
- See Also:
- Constant Field Values
-
-
Constructor Details
-
URIHelper
public URIHelper()
-
-
Method Details
-
queryItems
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 URISyntaxExceptionCreate 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
-