public final class Utils
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | THREAD_PREFIX | 
| Constructor and Description | 
|---|
| Utils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | checkMain() | 
| static void | checkNotMain() | 
| static android.graphics.Bitmap | decodeBitmapFromBytes(byte[] bytes,
                     int reqWidth,
                     int reqHeight) | 
| static android.graphics.Bitmap | decodeSampledBitmapFromResource(android.content.res.Resources res,
                               int resId,
                               int reqWidth,
                               int reqHeight) | 
| static java.lang.Float | getFloatSafe(java.lang.Float floatInput)Helper method when we know it is safe to return 0 in null state. | 
| static java.lang.Integer | getIntegerSafe(java.lang.Integer integer)Helper method when we know it is safe to return 0 in null state. | 
| static java.lang.String | getPackageName(android.content.Context applicationContext) | 
| static java.util.UUID | getUuid(android.content.Context applicationContext) | 
| static java.lang.String | getVersionCode(android.content.Context applicationContext) | 
| static java.lang.String | getVersionName(android.content.Context applicationContext) | 
| static boolean | isMain() | 
| static boolean | isStagingEnvironment(BazaarEnvironment environment) | 
| static <Key,Value> | mapPutSafe(java.util.Map<Key,Value> map,
          Key key,
          Value value) | 
| static java.lang.String | toBase64(android.graphics.Bitmap bitmap) | 
| static java.net.URL | toUrl(java.lang.String urlStr) | 
public static final java.lang.String THREAD_PREFIX
public static boolean isStagingEnvironment(BazaarEnvironment environment)
public static java.lang.String getPackageName(android.content.Context applicationContext)
public static java.lang.String getVersionName(android.content.Context applicationContext)
public static java.lang.String getVersionCode(android.content.Context applicationContext)
public static <Key,Value> void mapPutSafe(java.util.Map<Key,Value> map,
                                          Key key,
                                          Value value)
public static java.net.URL toUrl(java.lang.String urlStr)
public static java.lang.Integer getIntegerSafe(java.lang.Integer integer)
integer - input valuepublic static java.lang.Float getFloatSafe(java.lang.Float floatInput)
floatInput - input valuepublic static java.util.UUID getUuid(android.content.Context applicationContext)
public static void checkNotMain()
public static void checkMain()
public static boolean isMain()
public static android.graphics.Bitmap decodeSampledBitmapFromResource(android.content.res.Resources res,
                                                                      int resId,
                                                                      int reqWidth,
                                                                      int reqHeight)
public static android.graphics.Bitmap decodeBitmapFromBytes(byte[] bytes,
                                                            int reqWidth,
                                                            int reqHeight)
                                                     throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String toBase64(android.graphics.Bitmap bitmap)