//将原文件从SD卡读出 File inputImage = new File(Environment.getExternalStorageDirectory() + "/MyWork/" + fileIndex + "/originalPicture"); FileInputStream fin = new FileInputStream(inputImage); int length = fin.available(); byte[] buffer = new byte[length]; fin.read(buffer); byte[] byteSecretKey = strSecretKey.getBytes("UTF-8"); byte[] decodeData = desDecodeCBC(byteSecretKey, buffer); //将解密后的文件存为新的文件 File decodeOriginPic = new File(Environment.getExternalStorageDirectory() + "/MyWork/" + fileIndex + "/decodeOriginPic.jpg"); FileOutputStream fos2 = new FileOutputStream(decodeOriginPic); fos2.write(decodeData); fos2.close(); fileScan(Environment.getExternalStorageDirectory() + "/MyWork/" + fileIndex + "/decodeOriginPic.jpg");
文件在SD卡中的存读取
最新推荐文章于 2021-07-04 21:06:58 发布
