public final class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
encodeParameterValue(String value)
Encodes a string into application/x-www-form-urlencoded format using a UTF-8 as encoding
scheme.
|
static boolean |
isDateExpiring(Date date,
int seconds)
Checks if a date is expiring in a specified number of seconds.
|
static Properties |
loadConfig(String file)
Loads a (.properties) config file from the resources.
|
public static String encodeParameterValue(String value) throws UnsupportedEncodingException
value - String to be encoded.UnsupportedEncodingException - If the encoding scheme for the parameter is not
supported.public static boolean isDateExpiring(Date date, int seconds)
date - String representing the date.seconds - Number of seconds desired for the check.public static Properties loadConfig(String file) throws IOException
file - the filename of the config file (without the extension)Properties with the values from the config fileIOException - if the config file could not be loadedCopyright © 2022. All rights reserved.