11-15-2011 11:57 AM
On a playbook, I am trying to use the blackberry.io.file API to open a local file. From the blob, what is the correct way to read the binary file byte by byte?
I know there is the blogToString API, but does it work with binary file?
Thanks!
11-15-2011 12:39 PM
Hi asiayeah,
The Blob interface has a "getBytes" method, but I've never used it.
I have documented the missing Blob documentation here
button below the post(s)11-15-2011 10:55 PM
Thanks, jeffheifetz.
I have clicked on the link you posted, but I only find the issue with no documentation. Do you mean you are going to create one?
I have looked at https://github.com/blackberry/WebWorks-TabletOS/bl
Thank you.
01-09-2012 12:46 PM
01-09-2012 04:31 PM
As I stated earlier, the getBytes method is not currently in our documentation, the link is to an issue to track this so that it will be fixed at some point.
Here is a link to the gears Blob which I believe should match the implementation on the smartphone (atleast in 5.0). I do not know if this method is implemented on the playbook, best way is try and see.
button below the post(s)01-11-2012 12:24 PM
04-23-2012 11:15 AM
Actually the blob.getBytes is available on both PlayBook and BlackBerry smartphone platform. I am able to use it in my PlayBook app.
04-24-2012 12:58 AM
06-14-2012 10:54 PM - edited 06-14-2012 10:58 PM
Have RIM updated the missing documentation for the Blob yet?
I've been using the Blob.getBytes(). However, I found that it is leaking memory each time, getBytes() is called, even after releasing the returned byte[]. Is it a known issue? Is there any other workaround?
I'm testing on PlayBook 2.0.1.
Thanks.