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

Genuine OEM 1337761 IBM Easystrike Correctable Ribbon Cassette - Made in USA
$7.75
Genuine OEM 1337761 IBM Easystrike Correctable Ribbon Cassette - Made in USA  pictureVintage OEM ‘IBM 1337765 Easystrike Lift-Off Tape Cassette Made in USA in 1984
$5.0
Vintage OEM ‘IBM 1337765 Easystrike Lift-Off Tape Cassette Made in USA in 1984 pictureOEM CPU FAN & HEATSINK 14R0011 TSQC0039003--IBM SURE POS 4840-563 TOUCH SCREEN
$3.99
OEM CPU FAN & HEATSINK 14R0011 TSQC0039003--IBM SURE POS 4840-563 TOUCH SCREEN pictureIBM OEM STAPLE CARTRIDGE Infoprint 2085/2105 5000 Staples/Box 53P6725 LOT OF 2
$19.99
IBM OEM STAPLE CARTRIDGE Infoprint 2085/2105 5000 Staples/Box 53P6725 LOT OF 2 pictureRicoh 410508 Type H OEM Staple Ctge Savin-IBM-Toshiba-Lanier-Gestetner LOT OF 18
$85.0
Ricoh 410508 Type H OEM Staple Ctge Savin-IBM-Toshiba-Lanier-Gestetner LOT OF 18 picture






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