We made a special device just look like a T-flash card. The program
need to communicate with the device by the files. If we write
something in a.txt, the COS run in the T-card like thing will write
something in b.txt to answer. Here is the problem. If I use code like:

FileOutputStream fOutputS = null;
try {
        fOutputS = new FileOutputStream(hSTART);
        fOutputS.write(DataTmp);
} catch (Exception e) {
        errorCode = ERRORINFO.WRITE_FILE_ERROR;
        DataLength = 0;
} finally {
        if(fOutputS != null) {
                try {
                        fOutputS.flush();
                        fOutputS.close();
                } catch (Exception e) {
                }
        }
}

No error info return. And when I use the mobile app file explorer I
can see the file do changed. But the COS give no answer. And if I
unplug the card and connect to PC. I can see the file DIDNOT change at
all. Why this issue happens? Because the FileOutputStream is buffer in
the memory? and try to reduce the card write time?

How can I write the file phisically immediately? Please please, It's
so emergency. Otherwise we must cancel the whole project.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to