I would like to read raw binary data from a file on sdcard. Nothing
fancy ...

I'use a FileInputStream a 512 byte[] buffer, API version 8.

In the sample file attached, the first character give an a3 hex value,
10100011 binary value, 163 decimal value, and £ character thru
hexadecimal editor. But when i extract the first byte buffer after
call to read(byte[]) method, it gives me 111 decimal != 163. some
other byte are correct, other not, even with negative value. It seems
to be a potential bug don't you ?

byte[] bytes = new byte[512];
FileInputStream stream = new FileInputStream("/sdcard/sample.txt");
stream.read(bytes);

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sample.txt content
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
£o˜ JWJ~  ž “– JR[S74k}mssdJ\__XXZ74)('&%$#"!

-- 
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

Reply via email to