



dinoguan wrote:Just wondering what kind of file writing performance you guys are experiencing.
I am just writing a list of floats in a short string to a file on the SD card. Interestingly I am getting the exact same performance in the emulator as when I test on the actual device!
Anyway it is taking about 4.7 seconds to write 57 entries of something like this
"[0.166][0.00][-0.02][0.00]"
so 26bytes * 57 entries = 1482bytes in 4.7 seconds = 315 bytes per second.
I am using the standard java FileWriter to write to the sd card.
The only things I can think of is that I am writing from a view, not from an activity, so perhaps there is some overhead or permissions difference?
And I am just doing it in a loop all at once.
Thanks, Andrew


01-24 12:29:33.496: ERROR/AndroidRuntime(14845): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.remotecontrol/org.remotecontrol.RemoteControl}: java.lang.IllegalArgumentException: File conf/menu.conf contains a path separator



@Override
public void onPictureTaken(byte[] data, Camera camera) {
try {
Bitmap image = BitmapFactory.decodeByteArray(data, 0, data.length);
FileOutputStream stream = openFileOutput("example77"+ ".png", MODE_PRIVATE);
OutputStreamWriter osw = new OutputStreamWriter(stream);
image.compress(CompressFormat.PNG, 100, stream);
stream.flush();
stream.close();
Log.v(getClass().getSimpleName(), "onPictureTaken=" + data + " length = " + data.length);
/* filoutputStream.write(data);
filoutputStream.flush();
filoutputStream.close();*/
} catch(Exception ex) {
ex.printStackTrace();
}
} 


It's amazing. Buuuuttttt... I would like to know where the written file is placed. It's not become 'visible' to the programmer, right? I mean the written file is does not appear on Eclipse Package Explorer. I'm right?

Users browsing this forum: No registered users and 8 guests