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
UnsupportedEncodingException
public static javax.json.JsonArray readFile2JsonArray(String filePath) throws FileNotFoundException
FileNotFoundException
public static javax.json.JsonObject readFile2JsonObject(String filePath) throws FileNotFoundException
FileNotFoundException
public static String getStringFromInputStream(InputStream is) throws IOException
IOException
public static void jsonPrettyPrinter(Object object)
object
- public static String base64Encode(String in) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String base64Encode(byte[] in)
Copyright © 2018. All rights reserved.