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

MCM6206DJ12 Motorola Static RAM Memory 28PIN SOJ 32Kx8 12nS - NOS Qty 4
$8.99
MCM6206DJ12 Motorola Static RAM Memory 28PIN SOJ 32Kx8 12nS - NOS Qty 4 pictureNEW MOLEX 104031-0811 Memory Socket, 104031 Series (T)
$5.0
NEW MOLEX  104031-0811  Memory Socket, 104031 Series (T) pictureAllen Bradley, SLC 500, 1747-M13, SER A, 64K Flash EEPROM Memory, Used
$85.0
Allen Bradley, SLC 500, 1747-M13, SER A, 64K Flash EEPROM Memory, Used pictureSUNNORS Armrest Pads and Office Chair Arm Cover is Memory Foam for Elbow Rest
$18.86
SUNNORS Armrest Pads and Office Chair Arm Cover is Memory Foam for Elbow Rest pictureMemory DDR1 SDRAM Stacked: Vertical Circuits DD19.DD256M84UZBA5-400: 240pc
$174.0
Memory DDR1 SDRAM Stacked: Vertical Circuits DD19.DD256M84UZBA5-400: 240pc picture






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