Prob with FILE

Hi everybody,
I read a file txt char by char. Here is an example oy my file containt:
INSERT INTO DBD VALUES ("aaa","aaaa","aaaa",NULL,NULL,NULL,
TRUE,FALSE,FALSE);
INSERT INTO SUIVI VALUES ("bbbb","bbb",NULL,NULL);
INSERT INTO SUIVI VALUES ("cccc","ccc",NULL,NULL);
I want ONE row of each query, my first query is not good.
I read char by char and I place it in a BufferString. When I find a '\n' I continue without place this char in my BufferString, I place char althought i find the char ';'
Here is my code:
while (dejaLu < longueurFichier)
car = (char) flotLecture.read();
dejaLu = dejaLu + 1;
if(car != '\n') ========>It's not good !!!
if(car == '"') ligne.append("'");
else ligne.append(car);
if (car == ';')
msg.addFenMessage(ligne.toString());
//nbInsert = stmt.executeUpdate(ligne.toString());
cpt++;
ligne.delete(0, ligne.length());
My file txt is create in DL1, I don't know the carriage return char !!!
Please help me...

hi,
I think this might be a way to do it since hopefully BufferedReader's readLine method will sort out the newline problems for you
asjf
import java.io.*;
import java.util.*;
BufferedReader br = new BufferedReader(new FileReader(file));
List lines = new ArrayList();
String currentLine = "";
for(String line = ""; (line=br.readLine())!=null; ){
     currentLine+=line;
     if(line.endsWith(";")){
          lines.add(currentLine);
          currentLine="";
for(Iterator i = lines.iterator(); i.hasNext(); )
     System.out.println(i.next());

Similar Messages

  • MSI 538 - prob with firmware update

    I have seen that many had this same prob with this mp3 player.I tryed to update my ms-5538 and got message "Unidentified NOR Flash type".Set usb 1.1 nothing hapens, tryed other comps-same thing.Please help,what to do.  

    the links don't seem to be working properly at the moment, this is the file you need:
    http://us2.msi.com.tw/files/downloads/frm_exe/MS5538FW_v1.11.03.zip
    you can ignore the instructions in the ReadMe file. extract all the files in the zip, connect your 538 player (ensuring it is recognised and working correctly) and then run the FWISP.exe program file to update the firmware
    PS if your player is currently working fine with no problems then you do not need to update the firmware

  • Agp probs with GeForce4Ti4200

    hi @all!
    My prob is, that my geforce is working in AGP 2x mode instead of AGP 4x. i treid to install several drivers but it does not work. in my bios AGP 4x is enabled. i first thought its a prob with win2000prof, but this i checked (regedit).
    win2000prof
    PIII 800
    Biostar M6VCF (VIA82C694X/82C686A)
    i hope sb can fix my prob.  thx for your help

    Old VIA chipsets don't like AGPx4. There isn't any real loss of preformance here so for stability it would be best to leave it alone.
    If you want to try it still then install the VIA 4 in1 and if this won't enablr AGPx4 you can create an enpty .reg file and paste in it :
    /start copy here/
    REGEDIT4
    ; For Win9x/WinME
    [HKEY_LOCAL_MACHINE\Software\NVIDIA Corporation\Global\System]
    "EnableVia4x"=dword:00000001
    ; For NT4/WIN2K
    [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\nv4\Device0]
    "EnableVia4x"=dword:00000001
    /end copy here/
    Now double click this file.
    This will force AGPx4 on a VIA chipset.
    To undo create another such file and paste in it:
    /start copy here/
    REGEDIT4
    ; For Win9x/WinME
    [HKEY_LOCAL_MACHINE\Software\NVIDIA Corporation\Global\System]
    "EnableVia4x"=dword:00000000
    ; For NT4/WIN2K
    [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\nv4\Device0]
    "EnableVia4x"=dword:00000000
    /end copy here/

  • Problems with File Transfers Over Firewire 800

    Problems with File Transfers Over Firewire 800.
    Over the past month, I have had problems when transfering files from my harddrive, over Firewire 800 to a portable drive. I usually transfer very large files (20gb or more) to the portable drives for moving files around. When I drag a file over to copy onto a drive, the transfer starts normally. If I drag more files to copy over, the computer screen goes darker and a large icon comes up that looks like a power button icon. It tells me to restart, so I have to do a hard shut down on my G5. Weird. I also get the dark screen of death sometimes when I am transfering those large files and open another application to do some work while it's copying. It's killing me. I am having to sit here and wait for the transfer to finish before I can do anything.
    Any thoughts...
    Dual 2.7 GHz PowerPC G5
    Mac OSX 10.4.3
    Dual 2.7 GHz PowerPC G5   Mac OS X (10.4.3)  

    Have you run the Apple Hardware Test? Sounds like it could be a RAM problem.

  • Issue with File Download(messageDownload) on Search Page.

    Hi,
    I created a custom OAF search page which fetches values from one table. The document in getting stored in my custom table in a BLOB colums and NOT in FND_LOBS.
    The table has 3 collumns along with others:
    1st is primary key (Record_Seq) ==> number data type
    2nd to store actual file name (File1Name) ==> varcahar2 data type
    3rd to store the actual uploaded data (File1Data) ==> BLOB data type
    The reason for having the “File1Name” is so that I can display the original file name of the document that was uploaded, instead of just the “view” in the search page results .
    On the File1Data BLOB and created a messageDownload for that under query results table with following details:
    ID : File1Data
    ItemStyle : messageDownload
    FileMIME Type : pdf
    Datatype : BLOB
    View Instance : LacEmpExposureVO1
    view Attribute : File1Name
    File View Attribute : File1Data
    When I click on the "File1Name" data hyperlink, it is opening only the first document corresponding to the first record in the search page results.
    For example, If my search page returns 10 rows then when I click on the file1name on any row, It is open the first row file name only.
    I have a primary key column(RECORD_SEQ) in the Table / EO / VO which is displayed in the search page results.
    Also one weird thing is happening:
    If I try to do this more than 2 times then it is opening the update page with the first record from the search page results…
    I tried to print the context and it is nul the first time, But the second time then context is changing to "update". Dont know how this is happening????
    Any advice is greatly appreciated as it is very crucial for me to get this resolved ASAP. I have looked at several forums and did a lot of things as advised in the forums . But nothing seems to work for me.
    Thanks,
    Mir
    CO code for the search page
    ===========================
    if (pageContext.getParameter("Create")!= null)
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of CREATE");
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureCreatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    else if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of UPDATE");
    System.out.println("LacEmpExposureCO ==> RecordSeq in PROCESS FORM REQUEST is: " + RecordSeq);
    HashMap params = new HashMap(1);
    params.put("RecordSeq", RecordSeq);
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureUpdatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    params,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    else {           
    String strEvent = pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);
    System.out.println(strEvent);
    System.out.println("Into the last ELSE part in LacEmpExposureCO.java");

    Duplicate post -- Issue with File Download(messageDownload) on Search Page.

  • Prob. with iTunes, Phone won't shut off.  Tks.

    3GS with 6.1.3 Prob. with iTunes.  When I want to close out of iTunes after a Podcast the App will not close out when I hit Home. All other Apps shut down, only prob. is with iTunes.  Cant turn phone off goes back ti iTunes when turned on again.  Tks.

    I hope the previous replies are wrong. It was my understanding that even when Match is turned off in iTunes, music previously matched or uploaded to iCloud will stay there, associated with my Apple ID, even through a cold boot etc. If you want to remove songs from iCloud, but keep them locally, do this:
    1. Click "Store" in the iTunes top Menu
    2. Select "Turn on iTunes Match" (if it isn't already turned on)
    3. Close iTunes.
    4. Hold down the Shift key while you open iTunes - this will prompt you to choose or create a (new, locally empty) Library in a different folder from your main Library.
    5. Now you should see ONLY music that is stored in iCloud.
    6. Delete them all. iTunes will show a checkbox or button for you to click to delete the selected items from iCloud.
    7. Turn off iTunes Match (see #1)
    8. Restart iTunes with the Shift key again, so you can get back to your main Library - with Match turned off.

  • Error while opening pdf in reader in windows 8:Can't open this file. There's a problem with file format

    I have a problem with a pdf file which does not open with reader in windows 8 but it opens properly with adobe pdf reader. All other pdf can be opened in reader.But when i open a pdf(see this link for pdf for which i got error http://incometaxsoft.com/temp/Form.pdf)
    it gives error as "Can't open this file. There's a problem with file format".
    The same file opens properly in adobe pdf reader.You can check the pdf file which i have mentioned in the link above.But the reader which comes with windows 8 can open some other pdf in the same PC.What may be the error causing this??

    This has turned out to be an enormous issue for me as I sell PDF files as ebooks. I have done a fair amount of investigating this for my system.
    My files have to be compatible not just across readers but across operating systems.
    To date, I have over 200 PDFs that have functioned flawlessly across Mac, PC (Windows 7 and below), Android, iPhone/iPad, Linux.
    I personally test my PDFs using a variety of readers and PDF editors including
    PDF XChange (my favorite)
    Foxit (runner up for me and I recommend for most people)
    Adobe (the bloated monster)
    Nitro 9 (great for moving graphical elements around)
    ABBYY
    And the Nuance PDF Create toolsets
    Those are off the top of my head. There are a bunch on Android that I test with too.
    I am running the Windows 10 Pro Tech Preview and I have this same problem so I know it isn't fixed yet in any kind of pre-release way (-sigh-)
    Here is what I've learned for my situation
    The PDFs I created using NUANCE'S PDF CREATE PROFESSIONAL VERSION 8
    all fail using the built-in Windows 8/10 PDF reader.
    When I look at the PDF properties for these Nuance created files, the underlying engine used to write them is called "ImageToPDF". Using ABBYY it indicates their own engine as does everyone else that I've tried. It is easy for you to check to see
    what created your PDF by doing a "Control D" (look at the document properties). Perhaps there's a common engine causing issues.
    If I use the exact same source files to create a PDF using any of my other tools I have no issues. I checked the PDF versions made by the tools and they are all set to 1.5.
    A customer mentioned being able to convert them in a way they worked by saving them without having to do any kind of extraction, but I have not been able to duplicate that. Perhaps he did a "print" which seems like it could work.
    In summary, the workaround everyone is talking about, using an alternate reader, of course works. But not everyone wants to change.
     The culprit I have found is my Nuance PDF Creation tools that are using the ImageToPDF engine.
    I hope it gets FIXED as I really don't want to have to regenerate all of my PDF files.

  • Ever since the latest update, my task bar (if it's called that - it's the one with "file,edit,view, etc") will "grey out" and I won't be able to type into any websites I visit. Only way to fix:either restart Firefox or reduce the window and open it again.

    Ever since the latest update, my task bar (if it's called that - it's the one with "file,edit,view, etc") will "grey out" and I won't be able to type into any websites I visit. Only way I can proceed is if either restart Firefox (very annoying) or reduce the window and open it again. Please help!

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    See also:
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?  Next in Elements 11, how do I load and print different pictures and different sizes options on the same page?

    I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?  Next in Elements 11, how do I load and print different pictures and different sizes options on the same page?
    Thanks,
    Shir

    sbmgrams wrote:
    I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?
    See here:
    Reading PhotoDeluxe PDD Files

  • Re Time Machine I have an external  hard drive with files I backed up manually over the past 2 years 1TB of memory. I am finally taking the leap to use Time machine to back everything.   will I have to reformat that drive, thus wiping my previous bac

    Re Time Machine
    I have an external  hard drive with files I backed up manually over the past 2 years 1TB of memory.
    I am finally taking the leap to use Time machine to back everything.
    will I have to reformat that drive, thus wiping my previous back ups?
    can I split it the drive in two partitions?
    Also
    as I have two separate Macbook Pro's- one older than the other.
    OSX 10.68
    the other is
    OSX 10.75
    can I back them up separately?
    or even synch and merge files and folders etc? between the two?

    You CAN use a drive with files already on it to store Time Machine backups. But long term, that is not recommended. You do not need to reformat or re-partition the drive to do this. Once Time Machine Backups are established, you could remove the old files.
    But do not delete Time Machines files with the Finder -- that can cause it to lose its place and lose everything.
    With the cost of backup drives under US$100, it might be a better idea in the long run to get another drive. Best results from Time Machine is a drive about 3 times larger than the drive(s) you are backing up.

  • How do i make firefox automatically open a file. "Do this automatically with files like this from now on." does NOT work.

    I have firefox set to Open .wav files with VLC and i have the check box marked to "Do this automatically for files like this from now on." But every time i click download for a .wav voicemail from gmail, i get the same dialog box. I just want firefox to hand the downloaded file to VLC and play it. I don't want to have to click anything after i click the download link. Isn't that action what i'm telling firefox to do after i mark the checkbox with "Do this automatically with file like this from now on." ? Isn't that implied with my selection of the box? How can i fix this?i want to click a "download" link for a .wav voice mail in Gmail and have it automatically play in VLC without any further interaction from me.

    No it's saving the preferences and the check box remains checked from session to session. It will even continue to ask me to what to do with the file even in the same session when i try to download the same file again 5 seconds after i downloaded it the first time.

  • I have copied my iTunes library onto a new computer, but when I play back the songs there seems to be random "miss" or "drop out".  No probs with old computer, just the new one.  I'm onto my third new computer - same problem.  Any suggestions please?

    I have copied my iTunes library onto a new computer, but when I play back the songs using the new computer, there seems to be random "miss" or "drop out" during play back, similar to a small scratch on a vinyl record.  Although when I play the same song over again, the "miss" occurs in a different location during the song.  No probs with old computer, just the new one.  I'm onto my third new computer - same problem.  Any suggestions please?

    You don't say which version of iTunes you are using, but the symptoms you describe have been encountered by some users with the 64-bit version of iTunes 12.1.
    There is an alternative version for 64-bit editions of Windows here:
    iTunes 12.1 for Windows (64-bit — for older video cards)
    that seems to address the most of the playback issues that some users have been reporting with the full 64-bit version of 12.1.0.77 - including problems with Bluetooth speakers where either sound is degraded or completely absent.  The alternative installer here is the same architecture as most previous "64-bit" versions of iTunes, i.e., a 32-bit application with a 64-bit installer.  The "for older video cards" label appears to be something of a misnomer as some people have reported that this corrects problems found on current / high-spec systems.
    Some users have reported that after installing this alternative version it is necessary to adjust the "Play audio using" selection (normally to "Direct Sound" rather than "Windows Audio Session", though this may vary based on your audio hardware/drivers) in Edit > Preferences > Playback to restore glitch-free audio (one part of the reported symptoms is that the "Direct Sound" choice isn't available, usually in Windows 8).  It may also be necessary to ensure that your Bluetooth speakers are active and selected as the default audio device before you run iTunes.
    If this doesn't address the issue, you may want to think about reverting to iTunes 12.0 - see Turingtest2's notes on Troubleshooting issues with iTunes for Windows updates for steps needed to completely remove all installed iTunes components, and for links to the 12.0 installers.

  • Is there a way to view the messages I sent along with files in Adobe Send?

    Is there a way to view the messages I sent along with files in Adobe Send?

    Too bad...I wish that feature was still there that was in SendNow...I also have to go and get the recipients email each time I send a file instead of Send remembering the email addresses I have sent to in the past.
    Are any of the great features of SendNow going to be brought over into Send? Or are they just gone...I am a paying CC user...just curious what's going on at Adobe...Thanks for your very quick response though...I guess my message content is gone.

  • I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to sen

    I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to send emails with photos embedded. I like adding the frames and backgrounds and I think it's easier for recipients to look at the photos. Thanks for any suggestions of things to try.
    Gail

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • I suddenly have this error message on FireFoxthis message pops up: "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no re

    I suddenly encounter this error message from Fire Fox.
    Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features.
    I uninstalled the browser and download a new version but it does not resolve the issue.
    I know my hard disc has ample space. I do NOT know where to find the Profile directory to fix the read restriction box.
    == This happened ==
    Every time Firefox opened
    == After something about security add-on of Norton pop up by itself. ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; MSN Optimized;US)

    This link shows things to check - https://support.mozilla.com/kb/Could+not+initialize+the+browser+security+component

Maybe you are looking for

  • Trying to use 3 ips

    one of my macs for some reason has had trouble connecting, hardwired, to our network ever since we added a brother laser printer to our network. i was sure it was the printer but today i have changed my thoughts. i was to lazy to get up and walk 10 f

  • Parameter Prompting and Oracle Driver Issues

    I am in the process of testing several reports for use in Glassfish/JSP viewer.  I am in need of clarification of: 1.  Parameters are seen - but it does not prompt the user for the parameters on initial JSP page load.  Is this normal behavior or no? 

  • Error message: the resource type must not be null.

    Hi, I have working on Integrating Oracle E-Business Suite Release 12 with Oracle Access Manager 11gR1 PS2 (11.1.1.7.0) using Oracle E-Business Suite AccessGate. I am getting this error when I am Register the WebGate Agent with Oracle Access Manager.

  • Is there Siebel software for OEL5 64-bit?

    @ edelivery i only found siebel for linux x86 isn't there x86 64-bit vetsion of siebel or will the existing linux 86 flavor install on x86-64-bit also? appreciate your inputs & time

  • Scale an image to actual size?

    I often use the Crop Tool to get part of an image to print at actual size. For example, Crop: Width 7cm @ Resolution 600 pixels/inch (same as my printer), then select a known width of 7cm then crop and print. I figure there must be a way without actu