OK... three problems...

Originally Posted by
jules_
review0 = Image.createImage(is);
This reads data from the stream, so there won't be any left for you to read.

Originally Posted by
jules_
imageDataLength = is.available();
Does this always return zero? That might be because: this always returns zero. Check the JavaDocs. available() doesn't return the length of a file; that's not what it's for. Be very careful when using available(). You can be tricked because, in some cases, on some devices, it might seem to do what you want.

Originally Posted by
jules_
is.read(imgData1);
This is another InputStream thing to take care with. Check the JavaDocs, see the phrase "Reads some number of bytes...". That means, it doesn't always read the number of bytes you expect. You need to check the return value, and see how much actually got read. (The skip() method as a similar gotcha.)
Try this instead:
PHP Code:
conn = (FileConnection) Connector.open(filePaths[storedImages[0]],Connector.READ);
// get the size of the file
final int fileSize = (int) conn.fileSize();
// create a big enough buffer
byte[] imgData = new byte[fileSize];
// open the stream
is = conn.openInputStream();
// ...don't call createImage() here, or there will be no more data to read next
// this will track the number of bytes we've read so far
int bytesRead = 0;
// we keep reading, until we've read everything
while (bytesRead < fileSize) {
bytesRead += is.read(imgData, bytesRead, fileSize - bytesRead);
}
Graham.