I faced IOException when I tried to read file descriptor. Here is a
snippet.
----
desc = getContentResolver().openFileDescriptor(uri, "r");
descriptor = desc.getFileDescriptor();
BufferedInputStream input = new BufferedInputStream(new
FileInputStream(descriptor));
while ((len = is.read(fileBuffer)) != -1) {
// do something like writing data to output stream.
}
----
If I just read the file descriptor, it is fine. But, when I use the
data then I got an IOExcetion at FileInputStream#openCheck()
I solved this problem by using "getContentResolver().openInputStream
(uri)" instead of FileDescriptor.
But, I didn't understand the reason why I got an error. Does anyone
have idea on that?
Sung Ahn Kim.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---