URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

bbmChatDB of public database;

public static FileConnection fconnRead = null;
public static String fileReadData = "";
public static InputStream is = null;
data Byte [] = null;
DataInputStream is = null;

Here is my code...

I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

try {}

FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

If (fc.exists ()) {}

Enumeration e = fc.list ();

While (e.hasMoreElements ()) {}

System.out.println ("files are:" + (String) e.nextElement ());

play this file
StringBuffer stringBuff = new StringBuffer();
try {}
System.out.println ("opening file")-;
System.out.println ("file name is:" + (String) e.nextElement ());
fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
System.out.println ("data length")-;
If (fconnRead.exists ()) {}
is = fconnRead.openDataInputStream ();
data = IOUtilities.streamToBytes (is);
Ddd = new String string (data);
fileReadData = ddd.toString ();
System.out.println ("length of data:" + fileReadData.length ());
System.out.println ("read data :" + fileReadData);

}

} catch (IOException ee) {}
ee.printStackTrace ();
System.out.println ("Exception in the read data :")
+ ee.getMessage ());
}

}
}

} catch (IOException e) {}

e.printStackTrace ();
}

{Finally

try {}
If (is! = null) {}
is. Close();
}
System.out.println ("is closed...");
} catch (IOException e1) {}

E1. PrintStackTrace();
}

If (fconnRead! = null) {}
try {}
fconnRead.close ();
} catch (Exception e) {}
System.out.println (try ());
}

}

}

You can recode this treatment so that it uses only:

e.nextElement ())

Once a loop iteration.

Directly at the start saying something like:

String fileName = e.nextElement ());

and use fileName everywhere in your loop.

Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

{} catch (Throwable t)

t.printStackTrace ();

System.out.println ("Eception exception:" + t.toString ());

}

I think your code is thrown an exception and you don't see it.

Tags: BlackBerry Developers

Similar Questions

  • How can I read a PDF form with c# code. Can someone please help with the snippet of code or documentation.

    My requirement is to read the full user of PDF form fields using c# code.

    Any code snippet or a document will help.

    Thank you

    OK, Acrobat and the Acrobat SDK kit are not for the server. But Alice has produced s called LiveCycle business that had a Java API. This can help. It's enterprise software and not the same as LiveCycle Designer. There is also the Adobe PDF Library, which is C++.

  • I think that my system of basic windows files have been changed and currupted can someone please help!

    I get major errors that led me to think my windows files have been modified and currupted I just can't install microsoft updates they download, but I'm unable to install, I'm unable to use the Disk Defragmenter and disk scan as it said my system is already in use. I am also unable to use my acer factory restore settings because it loads but never finishes running can someone please help! I am not in a position to buy or pay for a new cd of windows so that I can make a new clean instalation as I can't afford it can someone please help!

    Download of updates of work but the installation of updates arnt working
    installation of games arnt working cd - I get errors
    disk defragment simply does not work I click top but nothing happnens - perhaps sumthing to do with priviliages admin, but I am the administrator.
    Scan disk does not work as it says system is already used but works if I put it to run at reboot
    MY acer DEFAULT factory restore setting does not work it loads but never short - that led me to believe I have no control over my privliages of basic windows system, but I am the adminsitror.

    I already had major problems when WIndows would break and stops working when you start up, I managed to solve this problem in safe mode and disabling some start up programs to check the malware was eventually attached to my system using windows scanner and malwarebytes defnder, I managed, but it seems that it is undetectable.

    I am unable to afford a new cd for a new clean instalation of windows, I think I need. can someone please

    Hello

    There is no Windows Vista downloads available from Microsoft.

    You can contact Acer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    http://us-store.Acer.com/RCD/

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    It comes to the use of the partition Recovery of Acer to restore factory settings.

    http://Acer.custhelp.com/app/answers/detail/A_ID/2631

    Note: During the process, all data stored on your computer will be overwritten. This means that all of your files, such as e-mail and photos, will be deleted. Therefore, we recommend making a backup of all data before starting the recovery process.

    To start the system recovery:

    1. Restart the computer.
    2. When the Acer logo appears on the screen, press the left Alt and F10 keys.
    3. If you are prompted with a Microsoft Windows splash screen, press the Enter key.
    4. After that the Acer eRecovery Management application is loaded, select your type of restore.
    5. Read the review and then click Next when you are ready.
    6. Click Next to start the restore process. It may take 10 minutes up to an hour fom anywhere to restore.
    7. Once the restore is complete, your computer will restart. After the reboot it will load Windows and start the installation of your software and drivers. Your computer will restart several times during this process. Once they are all completed, your computer will be like it was when you bought it first.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Some manufacturers have more available Vista recovery disks.

    If this happens or the recovery Partition is damaged, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • Since the new downloaded drive, display a pdf file was DOWNGRADED.  The color contrast is terrible and the quality of the screen reminds me of the first BACK operation displays. Help!  I want the quality looks an old back!

    Since the new downloaded drive, display a pdf file was DOWNGRADED.  The color contrast is terrible and the quality of the screen reminds me of the first BACK operation displays. Help!  I want the quality looks an old back!

    To add to this miserable viewing experience, we cannot even e-mail Adobe to communicate this déclassé experience.  We are forced to complain to others.

    Who knows of another pdf viewer application which is better (for viewing - what are the tools when he drove you nuts just to see your documents in Adobe reader?)

    Well, finally found.  Go to the edition/preferences/display Page.  Under "Rendering: smooth text", choose "for computer/laptop LCD screens". "  Do not know why the default value is set to 'none', which gives you this mess / hard to read test.

  • Adobe said I need an update in order to open a file specific .pdf... when I run the update is says I have the latest version for my OS. ???

    Adobe said I need an update in order to open a file specific .pdf... when I run the update is says I have the latest version for my OS. ???

    Alternatively, save the file of Chrome on your desktop - the one with the message. Then, open in Adobe Reader. It will not be solved by the upgrade, even if the message you tips in mind as well.

  • How to open a pdf and read/print using Microsoft Works file?

    Error message: Works cannot open "C:\Users\Desktop\Zeke's Menu.pdf.  The file may be in use by another application, the file format is not supported by any of the installed converters or the file may be corrupt.

    How to open this file and read/print using Microsoft Works or Notepad or something else?

    You can't with these programs - (there is no same Modules for these programs) - you need another program.  You must download the free Acrobat Reader http://www.adobe.com/products/reader/ allowing you to read and print PDF files (but you will not be able to edit/modify them with this program).

    To edit/change you need another program like free PDF Editor: http://www.freedownloadscenter.com/Business/MS_Office_Add-ins/Free_PDF_Editor.html.  You can also download the free OpenOffice Suite 3.2 http://www.openoffice.org/ which is capable to download and work with PDF files (via the writer program).  The good thing about OpenOffice is that you can then save the file in another format which CAN be read and used by Microsoft Works or Notepad (even though it may look very different without the features of PDF).  OpenOffice is very similar to Microsoft Office and most of the people who do not want to pay for Microsoft Office get OpenOffice instead because it is by far the best alternative (and some say that it is even better - although I don't agree with that).

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Vista OS does not load. I tried booting and the load screen bar continues to work without success. When you run the start he stops to c:\windows\system 32\cmd.exe that I don't want to lose my files so I have not reinstalled. Any suggestions?

    Vista OS does not load.  I tried booting and the load screen bar continues to work without success.  When you run the start he stops to c:\windows\system 32\cmd.exe that I don't want to lose my files so I have not reinstalled.  Any suggestions?

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Data recovery, if/before you reinstall:

    1. slave of your hard drive in another computer and read/save your data out there.

    2. put your Hard drive in a USB hard drive case, plug it into another computer and read/save from there.

    3 Alternatively, use Knoppix Live CD to recover data:

    http://www.Knopper.NET/Knoppix/index-en.html

    Download/save the file Knoppix Live CD ISO above.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://isorecorder.alexfeinman.com/isorecorder.htm

    Download the Vista software from the link above.

    After installing above ISO burning software, right click on the Knoppix ISO file > copy the Image to a CD.

    Knoppix is not installed on your PC; use only the resources of your PC, RAM, graphics etc.

    Change the boot order in YOUR computer/laptop to the CD/DVD Drive 1st in the boot order.

    Plug a Flash Drive/Memory Stick, BOOT with the Live CD, and you should be able to read the hard drive.

    When the desktop loads, you will see at least two drive hard icons on the desktop (one for your hard drive) and one for the USB key.

    Click on the icons of hard drive to open and to understand which drive is which.

    Click the icon for the USB drive and click on "Actions > Change the read/write mode" so you can write to disk (it is read-only by default for security reasons).

    Now to find the files you want to back up, just drag and drop them on the USB. When you're done, shut down the system and remove the USB key.

    See you soon.

    Mick Murphy - Microsoft partner

  • I can't sign into windows live messenger, I get the message that windows live messnger is unavailable currently try again later and also I get the error code 80048820, can someone help me solve this problem. __

    I can't sign into windows live messenger, I get the message that windows live messnger is unavailable currently try again later and also I get the error code 80048820, can someone help me solve this problem.

    Hello jabeena, welcome.

    This section would apply in fact to the Windows Live programs, but we'll see what we can do to help out you.

    I recommend to try this first:

    1. disable any antivirus software or security, you have running on your computer. Looking for software to disable that contains a firewall.

    2. click on START
    3. Type "cmd" (without the quotes). Right-click on the result at the top of the menu START and select 'run as administrator '.
    4 type the following and press enter

    Regsvr32 softpub.dll wintrust.dll initpki.dll

    5. then type the following command and press enter

    netsh winsock reset

    6. restart your computer and see what happens.

    Thank you! Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Can someone please help to get the drivers/utilities on my Sony laptop to my bluetooth stack?

    Toshiba bluetooth stack, Sony & Windows 7

    "To continue or not to continue the reinstallation of the Toshibas enigma -" Toshiba bluetooth stack "-on a Windows 7 Pro upgrade Vista Pro.

    After a clean install, I lost my beautiful environment of Bluetooth on my laptop Sony vgn-bx51-vn in 2005 (a laptop that is like finding teeth of chicken on the Sony site).  I did a smart thing to keep the "Toshiba" Bluetooth file when I finally removed the windows.old folder after the re-installation.  Only smart because it allowed me to compare models with a pilot of 'original' newly downloaded and files utility (including msi files) Sony - the result was that there are a lot of files that is different.

    They newly installed drivers grumble horribly subject knowing incompatabilities with Win 7 (which is just a skin on top of Vista... or so I thought) and refuse to carry you.  They subsequently take you to Toshiba where you end by abandon the search for any useful help in spite of being a good faith user - no?

    Cut to the Chase.  Can someone please help to get the drivers/utilities on my Sony notebook by hook or crook.  NB. I hope just to aspire to the use of Bluetooth for something useful someday but am also irritated by the cul-de-sac which is software policy.

    Thank you very much - I.

    Ok.

    I mentioned that I had 2 problems - no Wifi and no BT.

    Wifi driver here http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2259&DwnldID=20790&ProductFamily=Wireless+Networking&ProductLine=Intel%C2%AE+Centrino%C2%AE+Wi-Fi+Products&ProductProduct=Intel%C2%AE+PRO%2fWireless+3945ABG+Network+Connectioneng#help

    And here's the fix for BT http://mikescloset.blogspot.co.uk/2011/12/dell-toshiba-bluetooth-350-and-windows.html

    Credit to Mike for the intelligent correction.

  • When I install the first cc in 2015 compared to the creative clouds or updates the program I can t o open it again, the 0xc000001d error code

    When I install the first cc in 2015 compared to the creative clouds or updates the program, I can't o open it again, 0xc000001d error I have windows 7 ultimate AMD Athlon (TM) II X 5 1100t processor 3.84 Ghz 16 GB RAM. How can I solve this problem I need urgent program! Thank you

    Hi Oana M.

    Update first Pro CC 2015 (9.2).

    Thank you

    Kevin

  • Select multiple files and download

    Forms [32 bit] Version 10.1.2.3.0 (Production)
    using Webutil or something similar, is there a current functionality with my version of forms to select multiple files and upload them to the database, one after the other without going through the user use the dialog open several times?

    Thanks in advance

    Hello

    See the Webutil_File.FILE_MULTI_SELECTION_DIALOG () function.

    François

  • can someone please help, unable to update or restore error-1

    can someone please help I'm unable to update or restore my iphone 5 c due to an error (- 1).

    It is usually a hardware error and you will need to get it repaired. You can also get the same message if the iPhone was jailbroken.

  • I can't do updates on Windows 7 I get an error code 80073712, can someone me... ___Help help Please___Thanks

    I can't do updates on Windows 7 I get an error code 80073712, can someone help me...

    Help help help please

    Thank you

    .. .you you receive an error message that includes the following code when you try to use Windows Update: "0 x 80073712".
    http://support.Microsoft.com/kb/931712
    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I have an error message after an update, WindowsUpdate_0000737D""WindowsUpdate_dt000, can someone please help, my computer installs updates whenever I stop. "

    I have an error message after an update, WindowsUpdate_0000737D""WindowsUpdate_dt000, can someone please help, my computer installs updates whenever I stop. "

    @cinziac (who has not declared his complete version of Windows):

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    ~ Robear Dyer (PA bear); MS MVP (that is to say, mail, security, Windows & Update Services) since 2002. DISCLAIMER: I do not represent nor don't work for Microsoft

  • I just bought a key code to update from microsoft for windows xp. When I enter the code is says I have an invalid code? can someone help me?

    I JUST BOUGHT a key code to update from microsoft for windows xp. When I enter the code is says I have an invalid code? can someone help me?

    Hello

    1. what exactly are you referring?
    2. Enter the code to upgrade the main code of the Office application or operating system?

    Follow the steps in this article.

    You receive an error message after you enter the product key when you try to install Windows XP
    http://support.Microsoft.com/kb/310637

Maybe you are looking for