Package org.azd.helpers
Class Utils
java.lang.Object
org.azd.helpers.URLHelper
org.azd.helpers.Utils
Utility class that exposes helper methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNullOrEmpty(String value) Checks if a given string value is null or empty.static StringtoBase64String(File file) Converts the given file contents to base64 encoded string.static StringtoBase64String(InputStream inputStream) Converts a given input stream to base64 string.static StringtoEncodedString(String... values) Coverts string array of values to a comma separated encoded string.static StringtoString(int... values) Converts int array of values to string with ',' separated.static StringConverts object array of values to a comma separated string.static StringConverts string array of values to a comma separated string.static String[]toStringArray(int... values) Converts integer array to string array.Methods inherited from class org.azd.helpers.URLHelper
encodeSpace, encodeSpecialChars, encodeSpecialWithSpace
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
toString
Converts int array of values to string with ',' separated.- Parameters:
values- int array of values.- Returns:
- A comma separated string values.
-
toString
Converts string array of values to a comma separated string.- Parameters:
values- String array of values.- Returns:
- A comma separated string values.
-
toString
Converts object array of values to a comma separated string.- Parameters:
values- Object array of values.- Returns:
- A comma separated string values.
-
toStringArray
Converts integer array to string array.- Parameters:
values- Integer array of values.- Returns:
- String array of values.
-
toEncodedString
Coverts string array of values to a comma separated encoded string. For instance, if a string contains space it will be encoded as %20.- Parameters:
values- String array of values.- Returns:
- Comma separated string of values.
-
isNullOrEmpty
Checks if a given string value is null or empty.- Parameters:
value- String value to verify.- Returns:
- True if given string is null or empty and false if not.
-
toBase64String
Converts the given file contents to base64 encoded string.- Parameters:
file- File object.- Returns:
- Base64 encoded string.
-
toBase64String
Converts a given input stream to base64 string.- Parameters:
inputStream- Input stream to convert to base64 string.- Returns:
- Base64 encoded string value.
-