存儲與文件數據類型生成與文件數據類型動態列parse.com ---
獲取byte[]
表格中的數據,然後用它創建一個ParseFile
。
在這個例子中,我們只使用一個字符串:
ParseObject tableName = new ParseObject("NewTable");
tableName.put("columnOne", "string"); // string
tableName.put("columnTwo", 12); // integer
tableName.saveInBackground();
tableName.put("Filedata", file);
tableName.saveInBackground();
:
byte[] data = "Working at Parse is great!".getBytes();
ParseFile file = new ParseFile("filedata.txt", data);
file.saveInBackground();
最後,保存完成後,您可以在ParseFile到的parseObject就像任何其他一塊數據關聯
取回它涉及調用ParseObject上的getData變體之一。在這裏,我們擷取Filedata
文件了另一個對象:
ParseFile applicantFile = (ParseFile)anotherApplication.get("Filedata");
applicantFile.getDataInBackground(new GetDataCallback() {
public void done(byte[] data, ParseException e) {
if (e == null) {
// data has the bytes for the resume
} else {
// something went wrong
}
}
});
這是在Android Parse Guide.
喜@Ved普拉卡什更徹底的解釋看也不像,我只想創建數據類型命名的文件欄,看看這裏列創建隨着txt文件的輸入! –
我們需要帶有FILE數據類型的空白列 –