10-10-2009 02:40 PM
In OS 4.x, I had the following code that would read in images from the default pictures directory. It worked fine:
FileConnection fileConn = (FileConnection)Connector.open(file);InputStream input = fileConn.openInputStream(); // TODO: available now returns 0 bytes. Why?int available = input.available();byte encodedData = new byte[available];input.read(encodedData, 0, available);
The available size now returns 0 bytes so, of course, the read doesn't actually read anything. Is this a new bug in OS 5 or was there some change that I'm not yet aware of? Is there some new setting I need to configure?
Thanks for any info or insight!
10-12-2009 10:46 AM
No, that's not what I mean.
I mean I'm trying to read images the user (in this case, me) has saved to the direct. These usually end up there via the camera.
As stated in the previous post, this reading worked fine in OS 4.x. The files are still found there; the file names are correct. The issue is that the available bytes is listed as zero. The default gallery application has no trouble reading the images, so they're valid.
10-13-2009 10:04 AM
I know there are a bunch of other possible ways of doing this.
That's not really the point. The point is that it's not the same anymore.
The question is:
Is that by design? If so, everyone affected will have to create a work around.
Is that a bug in OS 5? If so, I can leave my code alone and let the platforms developers fix it before OS 5 is out of beta.
10-14-2009 01:05 AM
Absolutely, that was not the problem, what I felt was If you find a way that works with different module, you could escalate the issue to RIM with the details and it will be good for them to trace it. For other users it will be a workaround till the bug is fixed.
We could wait till RIM give back the reason.