@@ -0,0 +1,1368 @@
+package baidu.com.commontools.utils;%0A%0A%0Aimport android.os.Build;%0Aimport android.os.Environment;%0Aimport android.os.StatFs;%0A%0Apublic class StorageUtils %7B%0A%0A    /**%0A     * Get the internal storage directory (ROM)%0A     */%0A    public static String getInternalStorageDirectory() %7B%0A        return Environment.getDataDirectory().getAbsolutePath();%0A    %7D%0A%0A    /**%0A     * Get the available internal storage size (ROM).%0A     */%0A    @SuppressWarnings(%22unused%22)%0A    public static long getInternalStorageAvailableSize() %7B%0A        StatFs stat = new StatFs(getInternalStorageDirectory());%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.JELLY_BEAN_MR2) %7B%0A            return stat.getBlockSizeLong() * stat.getAvailableBlocksLong();%0A        %7D else %7B%0A            return (long) stat.getBlockSize() * (long) stat.getAvailableBlocks();%0A        %7D%0A    %7D%0A%0A    /**%0A     * Check if the external storage exists (SD Card)%0A     * @return true if the external storage exists, otherwise false%0A     */%0A    public static boolean isExternalStorageAvailable() %7B%0A        return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);%0A    %7D%0A%0A    /**%0A     * Get the external storage directory (SD Card)%0A     */%0A    @SuppressWarnings(%22unused%22)%0A    public static String getExternalStorageDirectory() %7B%0A        return Environment.getExternalStorageDirectory().getAbsolutePath();%0A    %7D%0A%7D%0A

change : add StorageUtils