Dear all,
Could you do me a favor?
I want to read and write binary files.
my code is as follow
//////////////////////// my code /////////////////
public static void writefile()
{
Context context = new Context();
try{
FileOutputStream os = context.openFileOutput("testdata.bin",
MODE_WORLD_WRITEABLE );
os.write(1);
os.close();
}catch(Exception ex)
{
}
}
/////////////////////////////////////////////////////////////
There are some error message: "Cannot instantiate the type
Context."
And I do not know what path should the binary files be placed.
Can someone give me a simple and complete example code how to
read/write binary files.
Thanks a lot.