android - How to add/get the internal application data? -


if have file in /data/data//files/data.dat, how data.dat file ? maked this:

file f1 = new file("data/data/carburant.android.com/files/data.dat"); inputstream in = new fileinputstream(f1); 

i know it's not 100% coorect ? how correct it? , how add file in path?

thank much.

option #1: call openoutputstream("data.dat");

option #2: call new file(getfilesdir(), "data.dat"); use getfilesdir()

option #3: call getfilestreampath("data.dat");


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -