BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-22-2011, 12:15 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default FileIOException file not found

Please Login to Remove!

I'm working on this app which has to export the data the user is working to a txt file, for future reference use.

But i'm getting a "file not found" exception thrown, funny thing is, i check if the file exist in which case, i just open the existing file or create a new one

Code:
 String filename = "name";
            FileConnection fc = (FileConnection) Connector.open("file:///SDCard/docs/");
            if(!fc.exists())
                fc.mkdir();
            if(fc.isDirectory())
            {
                fc.close();
                fc = (FileConnection) Connector.open("file:///SDCard/docs/data/");
                if(!fc.exists())
                    fc.mkdir();                
                if(fc.isDirectory())
                {
                    FileConnection file = (FileConnection) Connector.open("file:///SDCard/docs/data/" + filename + ".lec", Connector.READ_WRITE);
                    if(!file.exists())
                        archivo.create();
                    OutputStream data = file.openOutputStream();
                    String info = getInfo();
                    if(info != "0")
                    {
                        data.write(info.getBytes());
                        data.close();
                        file.close();
                    }
                    else
                    {
                        data.close();
                        file.close();
                    }
                }
So, any idea it aint working???

The directories are created either manually or on runtime as you can seem and the sd it is writeable
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

Similar Threads for: FileIOException file not found
Thread Thread Starter Forum Replies Last Post
I/O Error: Import file not found: ..\KSoapLibrary\deliverables\Standard\5.0.0\KSoapL i Ruchijain Developer Forum 0 07-12-2010 01:02 AM
Bes 4.1.7 Mr2 Mikey_AGBoston BES Admin Corner 5 04-29-2010 02:37 PM
how to force jad file to be re-generated on each build plevintampabay Developer Forum 2 07-30-2009 09:22 AM
File Transfers Not Working Via Bluetooth - Help! nudais General 8300 Series Discussion - Curve 11 10-26-2007 09:58 AM

Vintage DEC Digital M8639-YB RDRX Disk Controller Board 50-15649-01 E1 M8639
$125.0
Vintage DEC Digital M8639-YB RDRX Disk Controller Board 50-15649-01 E1 M8639  pictureVintage SIGNODE Crimping W14 Tool 17.5" long pat#1784123 dec9 1930 /N12167
$19.48
Vintage SIGNODE Crimping W14 Tool  17.5HSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$163.99
HSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP pictureHSS 21PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC - VINTAGE CAR,BIKES, JEEP
$222.99
HSS 21PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC - VINTAGE CAR,BIKES, JEEP pictureVintage Working Pelouze Model Y-5 Postal Scale Up To 7 Lb. Dec 31, 1975
$18.95
Vintage Working Pelouze Model Y-5 Postal Scale Up To  7 Lb. Dec 31, 1975   picture






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