这两天研究了一下android下的解压所技术,略有所获,下面是解压缩的操作方法。
  
private void unZipMapCache(){ try {        InputStream is = this.getAssets().open(ASSETS_NAME);ZipInputStream zis= new ZipInputStream(is);ZipEntry entry = null;while((entry = zis.getNextEntry()) != null){File file = new File("/mnt/sdcard/",entry.getName());if(entry.isDirectory()){file.mkdirs();continue;}else{file.createNewFile();  OutputStream myOutput = new FileOutputStream(file);  byte[] buffer = new byte[1024];         int count;         while ((count = zis.read(buffer)) != -1) {         myOutput.write(buffer, 0, count);         }         myOutput.close();}}zis.close();is.close();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}

更多相关文章

  1. Android(安卓)Zip压缩解压缩
  2. 【转】Launcher研究之AndroidManifest.xml分析
  3. 2011.06.03(2)——— android 1.6 launcher研究之自定义ViewGroup
  4. 2011.06.03(2)——— android 1.6 launcher研究之自定义ViewGroup
  5. Android(安卓)APK反编译
  6. Android(安卓)arm linux kernel启动流程
  7. android sdk MyEclipse adt 配置与开发 -windows
  8. android sdk配置
  9. android Application Component研究之BroadcastReceiver

随机推荐

  1. 【OpenCV3.3】搭建VS2017+Android开发环
  2. 基于Android(安卓)5.0的源码编译过程
  3. Android中长度单位和边距
  4. androidの自定义加载对话框ProgressDialo
  5. [置顶] Android 防内存泄露handler
  6. android tools工具下常用命令
  7. Android studio安装中遇到的各种坑汇总。
  8. Android图片剪裁-调用系统实现,完美适配魅
  9. Android实在在app内部控制按键震动
  10. Android(安卓)自定义弹幕控件