があり、Bundle
それをバイト配列としてディスクに保存します。今、それを取得すると、バイト配列が取得されます。これを に再度変換するにはどうすればよいBundle
ですか?
byte fileContent[] = new byte[(int)file.length()];
int numerOfReturnedbytes = 0;
try {
//read the stream and set it into the byte array readFileByteArray
//and returns the numerOfReturnedbytes. If returns -1 means that
//that the end of the stream has been reached.
numerOfReturnedbytes = fis.read(fileContent);
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
if (numerOfReturnedbytes == -1) {
return;
} else {
//creating empty parcel object
Parcel parcel = Parcel.obtain();
//un-marshalling the data contained into the byte array to the parcel
parcel.unmarshall(fileContent, 0, numerOfReturnedbytes);
}
はfileContent
バイト配列です。どうすれば問題を解決できるかについてのアイデアはありますか?