类 | |
| class | FileLastModifSort |
静态 Public 成员函数 | |
| static Bitmap | getBitmapFromSD (String url, int type, int desiredWidth, int desiredHeight) |
| static Bitmap | getBitmapFromSD (File file, int type, int desiredWidth, int desiredHeight) |
| static Bitmap | getBitmapFromSD (File file) |
| static Bitmap | getBitmapFromByte (byte[] imgByte, String fileName, int type, int desiredWidth, int desiredHeight) |
| static Bitmap | getBitmapFromURL (String url, int type, int desiredWidth, int desiredHeight) |
| static Bitmap | getBitmapFromSrc (String src) |
| static Bitmap | getBitmapFromAsset (Context context, String fileName) |
| static Drawable | getDrawableFromAsset (Context context, String fileName) |
| static String | downloadFile (String url, String dirPath) |
| static int | getContentLengthFromUrl (String Url) |
| static String | getRealFileNameFromUrl (String url) |
| static String | getRealFileName (HttpURLConnection connection) |
| static String | getRealFileName (HttpResponse response) |
| static String | getCacheFileNameFromUrl (String url) |
| static String | getCacheFileNameFromUrl (String url, HttpResponse response) |
| static String | getCacheFileNameFromUrl (String url, HttpURLConnection connection) |
| static String | getMIMEFromUrl (String url, HttpURLConnection connection) |
| static String | getMIMEFromUrl (String url, HttpResponse response) |
| static byte[] | getByteArrayFromSD (String path) |
| static void | writeByteArrayToSD (String path, byte[] content, boolean create) |
| static boolean | isCanUseSD () |
| static void | initFileDir (Context context) |
| static int | freeSpaceOnSD () |
| static boolean | clearDownloadFile () |
| static String | readAssetsByName (Context context, String name, String encoding) |
| static String | readRawByName (Context context, int id, String encoding) |
| static String | getDownloadRootDir (Context context) |
| static String | getImageDownloadDir (Context context) |
| static String | getFileDownloadDir (Context context) |
| static String | getCacheDownloadDir (Context context) |
| static String | getDbDownloadDir (Context context) |
| static int | getFreeSdSpaceNeededToCache () |
静态 Private 属性 | |
| static String | downloadRootDir = null |
| static String | imageDownloadDir = null |
| static String | fileDownloadDir = null |
| static String | cacheDownloadDir = null |
| static String | dbDownloadDir = null |
| static int | freeSdSpaceNeededToCache = 200*1024*1024 |
© 2012 amsoft.cn 名称:AbFileUtil.java 描述:文件操作类.
|
inlinestatic |
删除所有缓存文件.
|
inlinestatic |
下载网络文件到SD卡中.如果SD中存在同名文件将不再下载
| url | 要下载文件的网络地址 |
| dirPath | the dir path |
|
inlinestatic |
计算sdcard上的剩余空间.
|
inlinestatic |
描述:获取Asset中的图片资源.
| context | the context |
| fileName | the file name |
|
inlinestatic |
描述:将图片的byte[]写入本地文件.
| imgByte | 图片的byte[]形势 |
| fileName | 文件名称,需要包含后缀,如.jpg |
| type | 图片的处理类型(剪切或者缩放到指定大小,参考AbConstant类) |
| desiredWidth | 新图片的宽 |
| desiredHeight | 新图片的高 |
|
inlinestatic |
描述:通过文件的网络地址从SD卡中读取图片,如果SD中没有则自动下载并保存.
| url | 文件的网络地址 |
| type | 图片的处理类型(剪切或者缩放到指定大小,参考AbImageUtil类) 如果设置为原图,则后边参数无效,得到原图 |
| desiredWidth | 新图片的宽 |
| desiredHeight | 新图片的高 |
|
inlinestatic |
描述:通过文件的本地地址从SD卡读取图片.
| file | the file |
| type | 图片的处理类型(剪切或者缩放到指定大小,参考AbConstant类) 如果设置为原图,则后边参数无效,得到原图 |
| desiredWidth | 新图片的宽 |
| desiredHeight | 新图片的高 |
|
inlinestatic |
描述:通过文件的本地地址从SD卡读取图片.
| file | the file |
|
inlinestatic |
描述:获取src中的图片资源.
| src | 图片的src路径,如(“image/arrow.png”) |
|
inlinestatic |
描述:根据URL从互连网获取图片.
| url | 要下载文件的网络地址 |
| type | 图片的处理类型(剪切或者缩放到指定大小,参考AbConstant类) |
| desiredWidth | 新图片的宽 |
| desiredHeight | 新图片的高 |
|
inlinestatic |
描述:从sd卡中的文件读取到byte[].
| path | sd卡中文件路径 |
|
inlinestatic |
Gets the cache download dir.
| context | the context |
|
inlinestatic |
获取文件名(不含后缀).
| url | 文件地址 |
|
inlinestatic |
获取文件名(.后缀),外链模式和通过网络获取.
| url | 文件地址 |
| response | the response |
|
inlinestatic |
获取文件名(.后缀),外链模式和通过网络获取.
| url | 文件地址 |
| connection | the connection |
|
inlinestatic |
描述:获取网络文件的大小.
| Url | 图片的网络路径 |
|
inlinestatic |
Gets the db download dir.
| context | the context |
|
inlinestatic |
Gets the download root dir.
| context | the context |
|
inlinestatic |
描述:获取Asset中的图片资源.
| context | the context |
| fileName | the file name |
|
inlinestatic |
Gets the file download dir.
| context | the context |
|
inlinestatic |
Gets the free sd space needed to cache.
|
inlinestatic |
Gets the image download dir.
| context | the context |
|
inlinestatic |
获取文件后缀,本地.
| url | 文件地址 |
| connection | the connection |
|
inlinestatic |
获取文件后缀,本地和网络.
| url | 文件地址 |
| response | the response |
|
inlinestatic |
获取真实文件名(xx.后缀),通过网络获取.
| connection | 连接 |
|
inlinestatic |
获取真实文件名(xx.后缀),通过网络获取.
| response | the response |
|
inlinestatic |
获取文件名,通过网络获取.
| url | 文件地址 |
|
inlinestatic |
描述:初始化存储目录.
| context | the context |
|
inlinestatic |
描述:SD卡是否能用.
|
inlinestatic |
描述:读取Assets目录的文件内容.
| context | the context |
| name | the name |
| encoding | the encoding |
|
inlinestatic |
描述:读取Raw目录的文件内容.
| context | the context |
| id | the id |
| encoding | the encoding |
|
inlinestatic |
描述:将byte数组写入文件.
| path | the path |
| content | the content |
| create | the create |
|
staticprivate |
默认缓存目录.
|
staticprivate |
默认下载数据库文件的目录.
|
staticprivate |
默认APP根目录.
|
staticprivate |
默认下载文件目录.
|
staticprivate |
剩余空间大于200M才使用SD缓存.
|
staticprivate |
默认下载图片文件目录.
1.8.8