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!