我正在尝试使用 parse.com 为 Android 制作平板电脑应用程序。我还不擅长Android,但我正在尝试使用它来获取和反对:
ParseFile applicantResume = (ParseFile)anotherApplication.get("applicantResumeFile");
applicantResume.getDataInBackground(new GetDataCallback() {
public void done(byte[] data, ParseException e) {
if (e == null) {
// data has the bytes for the resume
} else {
// something went wrong
}
}
});
似乎我需要保存刚刚获得的新对象,但是以这种方式保存它时遇到问题:
FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
fos.write(data.getBytes());
fos.close();
知道如何保存数据吗?解析 API 说它是 byte[],不能让它工作:(