读取一个文件的数据流。
//创建文件的file对象
File file = new File(path);
//将file转换成InputStream对象
InputStream is = new FileInputStream(path);
//将file数据流写进databaseFilename文件
FileOutputStream fos = new FileOutputStream(databaseFilename);
byte[] buffer = new byte[8192];
int count = 0;
while ((count = is.read(buffer)) > 0) {
fos.write(buffer, 0, count);
}
fos.close();
is.close();