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

MCR Safety 4921 Red Ram Cow Leather Mig/Tig Welder Gloves with Wing Thumb,
$17.0
MCR Safety 4921 Red Ram Cow Leather Mig/Tig Welder Gloves with Wing Thumb, picturePower Team R1006L 100 Ton Locking Ring Hydraulic Cylinder / Ram / Jack.
$400.0
Power Team R1006L 100 Ton Locking Ring Hydraulic Cylinder / Ram / Jack. pictureNIB Intermec 751G6200E516C804 Barcode Scanner +Battery, 64 Ram 2D IMG CE CAC 804
$499.99
NIB Intermec 751G6200E516C804 Barcode Scanner +Battery, 64 Ram 2D IMG CE CAC 804 pictureGRID 1MB RAM Card for HP 48GX Calculator
$225.0
GRID 1MB RAM Card for HP 48GX Calculator pictureSMI 256k RAM Card for HP 48GX/SX Calculator Battery backed
$145.0
SMI 256k RAM Card for HP 48GX/SX Calculator Battery backed picture






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