I can only comment on question #3. It appears that scanner_buffer is 1024 bytes long, but only the bytes up to scanner_buffer_position have been set. Therefore the copy operation copies the relevant portion of scanner_buffer to a new array, encodedBytes, that is just the right length. If she had passed all of scanner_buffer to String(...), she would have gotten a string that represented all of scanner_buffer, including the entries that had not yet been set.
-- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

