您的位置:首页 > 移动开发 > Android开发

Java/Android将byte[]读入文件

2017-05-20 07:59 204 查看
File file = new File(Environment.getExternalStorageDirectory()
.getPath() + "/xiaxl/1.txt"); // 存放数组数据的文件
FileOutputStream out = null;
try {
out = new FileOutputStream(file);
// 将数组中的数据写入到文件中。每行各数据之间TAB间隔
out.write(frameData);
out.flush();
out.close();
} catch (IOException e1) {
e1.printStackTrace();
Log.d(TAG, "e1.getMessage(): "+e1.getMessage());
} // 文件写入流
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: