BTW, I tracked the fault down to a bug in the Android SDK. It is that
InputStreamReader.read(char[], int, int) doesn't always work across
buffer boundaries. Sometimes a NUL (0) gets inserted in the char[]
array. I changed my code so that it uses InputStreamReader.read()
repeatedly when I have to read more than one character at a time and
it works. This is in the 0.9 SDK.
-- Jon

On Aug 22, 4:17 pm, Jon Webb <[EMAIL PROTECTED]> wrote:
> I keep getting a crash (reading NUL which is not in the file) when I
> try to read a file into my app. The crash occurs at byte 16384 of the
> file. I assume this is some sort of buffering error because the buffer
> size is 8192. I posted an app on the issue list (http://
> code.google.com/p/android/issues/detail?id=811) but no replay so far.
> People seem to be getting responses here, so maybe this will work.
> My app works in J2ME and J2SE. It is just on the Android emulator that
> it doesn't. I had the same problem in the February / March SDK, and
> reported the bug then.
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to