public final class Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(java.io.Closeable closeable)
Close any Closeable quietly if any exception
is thrown simple ignore it
|
static java.lang.String |
getUrlWithQueryString(java.lang.String url,
RequestParams requestParams)
Util for GET request method, convert the given RequestParams
into a valid URL String query
|
static java.lang.String |
inputStreamToString(java.io.InputStream source)
Convert the given InputStream to a String
|
public static java.lang.String inputStreamToString(java.io.InputStream source)
throws java.lang.Exception
source - the InputStream to convertjava.lang.Exception - If the given InputStream is null or can't be accessedpublic static java.lang.String getUrlWithQueryString(java.lang.String url,
RequestParams requestParams)
url - the base URL to concat the queryrequestParams - the query parametersRequestMethod,
RequestParamspublic static void closeQuietly(java.io.Closeable closeable)
closeable - a class that implements Closeable to close