I am new in Blackberry. I want to get all images from particular path like "file:///SDCard/BlackBerry/pictures/". I have searched and found following code..
public static byte[] getBytesFromFile(String filename) throws IOException {
FileConnection fconn = null;
InputStream is = null;
try {
fconn = (FileConnection) Connector.open(filename, Connector.READ);
is = fconn.openInputStream();
return IOUtilities.streamToBytes(is);
} finally {
if (is != null) {
is.close();
}
if (fconn != null) {
fconn.close();
}
}
}
I have implemented this but i am getting Not a file exception. Is there any other way ?
If any one has idea, please help me as soon as possible..