从“资产”文件夹加载大于1M的文件
File f = File.createTempFile("mytempfile", "dat");FileOutputStream fos = new FileOutputStream(f);InputStream is = mc.getAssets().open(path,3);ObjectInputStream ois=new ObjectInputStream(is);byte[] data = (byte[]) ois.readObject();fos.write(data);fos.flush();fos.close();ois.close();is.close();
慕妹3146593
弑天下
随时随地看视频慕课网APP
相关分类