com.herroworld.imagegrabber
Class Utils

java.lang.Object
  extended by com.herroworld.imagegrabber.Utils

public class Utils
extends java.lang.Object

Class containing some static utility methods.


Field Summary
static boolean DEBUG
           
static int IO_BUFFER_SIZE
           
 
Method Summary
static void disableConnectionReuseIfNecessary()
          Workaround for bug pre-Froyo, see here for more info: http://android-developers.blogspot.com/2011/09/androids-http-clients.html
static int getBitmapSize(Bitmap bitmap)
          
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IO_BUFFER_SIZE

public static final int IO_BUFFER_SIZE
See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Method Detail

disableConnectionReuseIfNecessary

public static void disableConnectionReuseIfNecessary()
Workaround for bug pre-Froyo, see here for more info: http://android-developers.blogspot.com/2011/09/androids-http-clients.html


getBitmapSize

Get the size in bytes of a bitmap.

Parameters:
bitmap -
Returns:
size in bytes

isExternalStorageRemovable

Check if external storage is built-in or removable.

Returns:
True if external storage is removable (like an SD card), false otherwise.

getExternalCacheDir

Get the external app cache directory.

Parameters:
context - The context to use
Returns:
The external cache dir

getUsableSpace

Check how much usable space is available at a given path.

Parameters:
path - The path to check
Returns:
The space available in bytes

getMemoryClass

public static int getMemoryClass(Context context)
Get the memory class of this device (approx. per-app memory limit)

Parameters:
context -
Returns: