BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 01-02-2010, 06:19 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Sep 2009
Model: 8100
PIN: N/A
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!

Hi,

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).

Code:
FileConnection fc = (FileConnection) Connector.open("file:///store/home/user/pictures/abc.png", Connector.READ);
DataInputStream in = fc.openDataInputStream();
int length = (int)fc.fileSize();
byte[] arr = new byte[length];
in.read(arr);
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!!!

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

What is the exception?
Offline  
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

Black reversible plum zebra waitress server waiter apron 3 pockets
$13.0
Black reversible plum zebra waitress server waiter apron 3 pockets pictureIntel PWLA8494GT Pro/1000 GT Quad Network Card Server Adapter Refurbished
$89.99
Intel PWLA8494GT Pro/1000 GT Quad Network Card Server Adapter Refurbished pictureNEC Univerge SV8100 CD-VM00 Voice Mail and Server 670123 Refurbished
$274.99
NEC Univerge SV8100 CD-VM00 Voice Mail and Server 670123 Refurbished pictureUsed Vlinx model ESR901 ethenet serial server
$20.0
Used Vlinx model ESR901 ethenet serial server pictureProsoft MVI46-DFNT EtherNet/IP Client/Server Network Module for SLC-500
$695.0
Prosoft MVI46-DFNT EtherNet/IP Client/Server Network Module for SLC-500 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.