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

MULTI-SURFACE REFLECTOR DIAMOND CUT CRYSTAL EURO STYLE
$31.99
MULTI-SURFACE REFLECTOR DIAMOND CUT CRYSTAL EURO STYLE pictureMiteq PLD Series Phase-Locked Crystal Oscillator
$7.99
Miteq PLD Series Phase-Locked Crystal Oscillator pictureCrystal Oscillator HC-49U Assortment Assorted KIT 10Values 50pcs
$10.99
Crystal Oscillator HC-49U Assortment Assorted KIT 10Values 50pcs pictureAA119 Germanium Diode Point Contact Crystal Radio Detector - NOS Qty 5
$10.0
AA119 Germanium Diode Point Contact Crystal Radio Detector - NOS Qty 5  pictureSimple Green 19128 Crystal Industrial Cleaner/Degreaser 1 Gallo...
$23.26
Simple Green 19128 Crystal Industrial Cleaner/Degreaser 1 Gallo...  picture






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