I'm getting an IOException using the following code: InputStream is = getResources().openRawResource(R.raw.myfile); byte[] data = new byte[is.available()]; is.read(data); is.close();
The IOException occurs during the read. What's weird is that if I do a single byte read there is no IOException. Even if I try something like: s.read(data, 0, 2); to read 2 bytes, it still throws the exception while two sequential single byte reads (via is.read()) work just fine. Any ideas what could be causing this behavior? Am I doing something wrong? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

