BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 01-02-2010, 05:19 AM   #1 (permalink)
Thumbs Must Hurt
Join Date: Sep 2009
Model: 8100
Carrier: Airtel
Posts: 75
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Issue in reading image file from file:///store/home/user/pictures/*

Please Login to Remove!


Wish you all a very happy new year

On the very first day of this year I'm facing a problem while reading an image file from file:///store/home/user/pictures/*. I've tried my code on simulators and its running fine but its not running on device (tried on 8820 and bold).

FileConnection fc = (FileConnection)"file:///store/home/user/pictures/abc.png", Connector.READ);
DataInputStream in = fc.openDataInputStream();
int length = (int)fc.fileSize();
byte[] arr = new byte[length];;
My app is throwing exception while opening DataInputStream, and if I try to retrieve size of any file in same location then again it throws exception.

Please tell me whether it is possible to read files present in this location or not!!!

Old 01-02-2010, 09:30 AM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts

What is the exception?
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Copyright 2004-2014
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.