Package com.inmobi.commons.utils
Object NetworkUtils
-
- All Implemented Interfaces:
public class NetworkUtils
-
-
Field Summary
Fields Modifier and Type Field Description public final static NetworkUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final ErrorCodecheckNetworkConnectionErrors(Boolean forceCheckValidatedFlag)Checks network connection errors. final Map<String, String>getEncodedMap(Map<String, String> map)final UnitsanitizeMap(Map<String, String> map)final <Error class: unknown class><String, String>jsonToMap(JSONObject macros)final StringsubstituteMacros(String url, Map<String, String> macroSubstitutions)final ByteArraygZipDecompress(ByteArray compressedData)final ByteArraytoByteArray(InputStream input)final UnitcloseSilently(HttpURLConnection connection)final static UnitcloseSilently(Closeable closeable)final UnitputAllJSONObject(JSONObject baseJSONObject, JSONObject jsonObject)-
-
Method Detail
-
checkNetworkConnectionErrors
final ErrorCode checkNetworkConnectionErrors(Boolean forceCheckValidatedFlag)
Checks network connection errors.
- Parameters:
forceCheckValidatedFlag- if true, it will check for validated flag even if skipNetworkValidationFeatureEnabled is enabled.
-
sanitizeMap
final Unit sanitizeMap(Map<String, String> map)
-
jsonToMap
final <Error class: unknown class><String, String> jsonToMap(JSONObject macros)
-
gZipDecompress
final ByteArray gZipDecompress(ByteArray compressedData)
-
toByteArray
final ByteArray toByteArray(InputStream input)
-
closeSilently
final Unit closeSilently(HttpURLConnection connection)
-
closeSilently
final static Unit closeSilently(Closeable closeable)
-
putAllJSONObject
final Unit putAllJSONObject(JSONObject baseJSONObject, JSONObject jsonObject)
-
-
-
-