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

1PCS PLCC IC Chip Extractor Motherboard Circuit Board Component Puller Tool FAUS
$4.44
1PCS PLCC IC Chip Extractor Motherboard Circuit Board Component Puller Tool FAUS pictureP06721-20 mother board sonosite micromaxx.
$1950.0
P06721-20 mother board sonosite micromaxx.  pictureHubbell LX2000 Mother Board 49267-101
$125.0
Hubbell LX2000 Mother Board  49267-101 picture1pc used Fuji G11 P11 Motherboard EP-3955D Z1
$920.0
1pc  used   Fuji G11 P11 Motherboard EP-3955D Z1 pictureMOTHERBOARD 060-00874-0006 EPC2X25 23R5692 USED
$199.0
MOTHERBOARD 060-00874-0006 EPC2X25 23R5692 USED picture






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