public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static String |
base64Encode(byte[] in) |
static String |
base64Encode(String in) |
static String |
getStringFromInputStream(InputStream is) |
static void |
jsonPrettyPrinter(Object object)
This printer only support JsonObject and JsonArray
|
static javax.json.JsonArray |
readFile2JsonArray(String filePath) |
static javax.json.JsonObject |
readFile2JsonObject(String filePath) |
static String |
stringValue(Object o) |
static String |
urlEncode(String value) |
public static String stringValue(Object o) throws DatatypeConfigurationException, UnsupportedEncodingException
public static String urlEncode(String value) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static javax.json.JsonArray readFile2JsonArray(String filePath) throws FileNotFoundException
FileNotFoundExceptionpublic static javax.json.JsonObject readFile2JsonObject(String filePath) throws FileNotFoundException
FileNotFoundExceptionpublic static String getStringFromInputStream(InputStream is) throws IOException
IOExceptionpublic static void jsonPrettyPrinter(Object object)
object - public static String base64Encode(String in) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String base64Encode(byte[] in)
Copyright © 2018. All rights reserved.