Help in writing to a file with newline facility

I am using the RandomAccessFile class to write to a file.
The content i am writing to the file is of the form
KEY=VALUE.
I am writing several key value pairs like this.
Everytime I write a KEY=VALUE it should be in a new line.
So, what should i do to write in a new line everytime.
Please help.
Thanks in advance.

Well the square most likely is just a non-printable character. If you are on windows the line.separator is \r\n (0x13 and 0x10) some file editors show the \n as a "square" as the only expect a \r its just how you interpret the file.. you can't atually do anythign about it as it isn't "wrong" if you skip the \n some programs might not see it as a newline. If you add it some may display a square.. Its the great gift of different OS's using different line separators..
HTH
Lima

Similar Messages

  • Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an er

    Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an error appears on the pages with video content?

    its in german:
    der Vorgang könnte nicht abgeschlossen werden.
    something like the process coundnt be completed

  • Writing binary to file with 24 or 32-bit numbers

    I am using an NI4472 DAQ to sample some analog data at 24-bits and I want to write the data to disk. However LabView only has a VI to write 16-bit data to disk. Is there a way to write 24 or 32 bit binary numbers to a file?

    The VI you are looking at is probably one of the "Easy VIs" that is setup for a specific application. You can create more general programs to write a binary file with any data type you desire. I would recommend taking a look at the Write Binary File example that ships with LabVIEW. It shows a more general approach to writing data to a binary file. In this example they write double precision numbers but you could easily replace the data with I32s.

  • Writing a report file with specific information

    Hi, all:
    I need to write a text file with specific information in it. I'm going to copy it into Excel, so the easier the format, the better (perhaps CSV format?). I've never done this before, so here's the method I need to capture the information from:
         public void step() {
              greenColorStorage = new ArrayList();
              magentaColorStorage = new ArrayList();
              System.out.println( "==> Model step " + getTickCount() );// Checking step #
              for (int i = 0; i < soldierList.size (); i++) {
                   Soldier s = (Soldier) soldierList.get (i);
                   s.step();
              Collections.shuffle(soldierList);
              System.out.println("Shuffling collection now.");
              dsurf.updateDisplay ();
              System.out.println("Model.step() finished.");
              for (int i = 0; i < soldierList.size (); i++) {
                   Soldier s = (Soldier) soldierList.get (i);
                   if (s.getMyColor() == Color.green ) {
                        greenColorStorage.add(s);
                   if (s.getMyColor() == Color.magenta ) {
                        magentaColorStorage.add(s);
              if (magentaColorStorage.size() == 0 || greenColorStorage.size() == 0 ) {
                   stop();
         }In this method, I need to capture this information: There are soldiers on the Green team and on the Magenta team. I need to know how many there are originally, how many in this time step, at what time step the model stops, and how many of the winning color team are left when the model stops. How do I do this? If you can point me to a specific thread that shows how to write a report file like this, I'd be grateful, since I couldn't find one when I searched. Otherwise, I'd be grateful for examples. I'm in the middle of doing some research, and I have the feeling that I'll need to write report files in the future, so if you'd explain any code you provide, I would be quite grateful--I need to understand what I'm doing as well as simply using your code so that I can really learn what I'm doing when I do this again. Thanks very much!

    FileOutputStream
    public FileOutputStream(File file,
                            boolean append)
                     throws FileNotFoundException
    Creates a file output stream to write to the file represented by the specified File object.
    If the second argument is true, then bytes will be written to the end of the file
    rather than the beginning.
    */

  • Help - can't open .mpg file with Quicktime 7.3

    Hi folks,
    Just tried to open a .mpg file of a recent santa visit for my little boys and Quicktime indicated it couldn't open it saying it wasn't a movie.
    I upgrade to Quicktime pro but that didn't solve the problem.
    Any thoughts as regards possible symptoms ? When I left Lapland the assistant played back the clips on a USB disk so it seems as if the file is okay !?
    I was trying to import the clip into an iMovie project to burn a DVD in time for Christmas - any other application I could use as a workaround to get this into a format that iMovie would recognise ?
    Thanks,
    Kieran.

    Apple Discussions!
    Check to see if anything in the following threads are of any help:
    http://discussions.apple.com/message.jspa?messageID=6163054#6163054
    http://discussions.apple.com/thread.jspa?threadID=1301325&tstart=50

  • HELP..accidently replaced full file with old one of same name.

    I think i really screwed up!
    Last night I was organizing my computer files and folders for work. I transferred many files over from my old powerbook and had many duplicate files. I was moving pretty fast dragging and dropping, cut and pasting, creating new folders.
    Then I moved a file over to another one that had the same name. The box came up asking if "I would like to replace the contents... I said yes!
    Then in horror I realized the new folder had nothing in it and I had replaced it for the old file which was full of design ads, quotes, logos, menus, wine lists, ETC all for work.
    Where did all the contents of the old file go? I can not find it anywhere. Did it seriously delete the entire contents and not even put it in the trash?
    PLEASE HELP> I am in big trouble here.
    Thank You
    Rich

    Short answer: it sounds like the file is gone for good.
    Unless... do you have Time Machine enabled (or some other backup)?
    charlie

  • I need help in writing siginal in file

    Hi ,
    I have faced problem in writting to measurement File. I have received an error state  (( These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
    The type of the source is cluster of 3 elements.
    The type of the sink is Dynamic Data.))
    How I slove this problem?
    I have attached the labview file. i would be so grateful if you help to figure out the problem.
    Khalid
    Solved!
    Go to Solution.
    Attachments:
    Test (6) (11).vi ‏128 KB

    Hi engkhalid,
    -Yes, the Output of FFT-(RMS) is a cluster of three elements, which will not be accepted by Write to Measurement File.
    -May be you can try Unbundling the cluster and build the array and then send the data, But this will alter how the data is saved in the file i guess.
    -Please find the attachment for the modification i suggested.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Test (6).vi ‏160 KB

  • Help for writing to excel file from Java Program

    Hi,
    I am new to Java and Java API. I need to write to some specific cells of an excel file from a Java Program. Please anyone help me or give some directions.
    Thanks,
    Reet

    Hi,
    I saw an example while searching in google about importing jxl.*. Could you direct me how I can import this package as java does not have it. I heard that jxl is much easier that POI although I am not new to both of them.
    Thanks,
    Priya

  • Need help in writing the control file for SQLLOADER

    Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
    i.e. My data file is something like
    aaa,bbb,cc
    dd,eee
    And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
    Thanks...

    Nisha,
    Again I posted test example in your other post but here is how can do that
    CREATE TABLE mytest111 (
       col1 NUMBER,
       col2 NUMBER,
       col3 NUMBER
    LOAD DATA
    TRUNCATE INTO TABLE MYTEST111
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 integer external,
    col2 integer external
    #mytest.dat
    1,2,3
    1,2
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   mytest.ctl
    Data File:      mytest.dat
      Bad File:     mytest.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table USIUSER.MYTEST111, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    COL1                                FIRST     *   ,  O(") CHARACTER           
    COL2                                 NEXT     *   ,  O(") CHARACTER           
    Table MYTEST111:
      2 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  33024 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             2
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Fri Apr 10 11:40:39 2009
    Run ended on Fri Apr 10 11:40:40 2009
    Elapsed time was:     00:00:00.99
    CPU time was:         00:00:00.06
    {code}
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Writing in existing file with applet

    hi,
    i tried the following code after reading one of sun's tutorials:
    public void fWriteFile(){
              File f = new File(fileName);
              DataOutputStream dos;
              try{
                   dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fileName)));
                   dos.writeChars(Lang1+";"+Lang2+";"+Lang3+";"+Lang4+";"+Lang5);
                   for(int i=0;i<wbVec.size();i++){
                        StringTokenizer lastTok = new StringTokenizer((String)wbVec.elementAt(i),";");
                        lastTok.nextToken();
                        lastTok.nextToken();
                        String deu = lastTok.nextToken();
                        String eng = lastTok.nextToken();
                        dos.writeChars(deu + ";" + eng + "\n");
                   dos.close();
              }catch(SecurityException se){
              }catch(IOException ioe){
    and now i am confused since the apllet just doesnt write anything in the ... file

    it's a dictionary, i read the entries from and in case
    some changes were made they need to be saved... as far
    as i knew the applet had rights on a local system but
    not over the web...Nope. Think about it... What if someone wrote a malicious applet, and put it on the web. Then you go to their site, and they trash your file system.
    You'd have to make the applet a "trusted" one to do that, though I'm not here to answer questions about how that's done. Search the forum or other sites.

  • Static Files with same name. How does apex determine which files to serve?

    Hello, I'm using apex 4.2.1.00.08 and I cannot figure out how apex manages the static files and cannot find any help in the docs (other that some high level UI description).
    The application is serving some file and I cannot find which one it is in any easy way.
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen as
    SELECT *
    FROM wwv_flow_files
    WHERE flow_id = 0;
    and can apparently only be deleted using "SQL Commands" inside apex.
    the URL called is something like
    wwv_flow_file_mgr.get_file?p_security_group_id=13498126233076320&p_fname=myfile.css
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.
    apparently files linked to flow_id 0 have precedence over all the other files ...
    Thanks for clearing up a bit of "fog" on this issue.

    VC wrote:
    Go to that application > shared components > Static files you should see the file.the problem is that there are multiple files with that name, and that sometimes the file being served is linked to application "0" and it doesn't show in the "shared components" interface ...
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.Static files can be uploaded to apex with optionally associating with an application within that workspace.
    Files associated with an application are referenced using *#APP_IMAGES#*
    Files not associated with an application are referenced using *#WORKSPACE_IMAGES#*I referenced with #WORKSPACE_IMAGES#, but now I see that if I use #APP_IMAGES# the URL generated will also contain the application ID. This would help to discriminate between different files with the same name but linked to different applications ...
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen asWhy are you particularly interested in application 0?Because somehow APEX puts the files that I uploaded there ... they can be seen selecting from wwv_flow_files. Do they take precedence over all other files with the same name?
    Filename is unique for the given workspace[and application]I disagree. I have multiple files with the same name ... the root of this problem ...
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.How is your static file referenced??
    But not always, try associating an static file with and application and reference it using #APP_IMAGES# instead of #WORKSPACE_IMAGES#
    See
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm#BEIDCGAJ
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ui_file_manage.htm#HTMDB06011
    Thanks, but the documentation doesn't give much details ... apparently files referenced with #WORKSPACE_IMAGES# can still resolve to files linked to specific applications ... I would like to understand the actual workflow for the various cases (file references with APP_IMAGES, referenced with WORKSPACE_IMAGES, file associated with the application, with another application, with no application, with application "0" ...).
    Also, I find it somewhat misleading that you can have files associate with applications that don't exist anymore (e.g. have been deleted).
    Edited by: GChierico on Apr 11, 2013 2:16 PM

  • Streaming Larges Files with Quicktime

    Hey guys - I am in need of some serious help. I have streamed files with quicktime before, no problem. But now I need to stream about 75 minutes worth of video. How do I do this and keep quality video and sound? I don't mind having a large file as long as it streams. But 1.2 gigabytes is a little ridiculous. I have seen this done with WMV but I am having trouble doing it with quicktime. It's very frustrating because there are so many compression packages and options within those. I would like to finish before I die. Anybody have any ideas?

    Streaming ANY size file is really an issue of bandwidth out of the server. The closer the server is to a backbone and the better the connection to the backbone, the better feed you have.
    Everybody sing!
    The backbone connected to the T-1,
    The T-1 connected...
    Oh nevermind.

  • Help with writing a batch file

    Hi :
    does anyone know anyplace online that I can get help in writing batch files?? I have never worked much with batch files before....
    any help is greatly appreciated
    thnx

    I suppose, since you're in a Java forum, you need batch files to load java applications.
    If you use windows :
    go to ms console (start/run/"cmd")
    type edit mybatch.bat
    write your command to load a java application, something like
    java myclass.class
    save and exit.
    Be sure the bat file and the class are in the same folder.
    And make certain you've set the classpath, and path variables correctly.
    If this was what you needed and you need more help just ask.
    (In this case it could be better to make executable jars)
    If you wanted to know about linux batches, it works pretty the same way.

  • Can someone help with a previous post labeled "Writing to a data file with time stamp - Help! "

    Can someone possibly help with a previous post labeled "Writing to a data file with time stamp - Help! "
    Thanks

    whats the problem?
    Aquaphire
    ---USING LABVIEW 6.1---

  • Please help with "Error writing the project file. The specified module could not be found." error.

    I am a student.  I've been trying to install and use Visual Studio 2013 Professional for three weeks now and I cannot get it to work.  I am now two weeks behind in my Visual Basic class.  I've installed, uninstalled, ran the repair option... 
    I've tried everything I know how to do.  I just spent 45 minutes on the phone with Microsoft, was transferred four times and finally told I will have to use the forums to find an answer.  I'm almost completely out of patience with this.
    I got the software through the Dream Spark program as a student.  I installed it with the web installer and it appeared to install fine.  When I try to create a new project, I get the error:  "Error writing the project file.  The
    specified module could not be found."
    When I exit the application, I also get:  "The automatically saved settings file 'c:\users\user\documents\visual studio 2013\Settings\CurrentSettings-2015-02-02.vssettings' is not available for write.  You can change this file on the 'Import
    and Export Settings' Tools Options page."
    Please tell me you can help.

    Hi,
    could you please try the points mentioned here:
    http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/0376db8f-4761-4ae5-9af2-98c53216318a#VS_IDE_unexpected_problems to eliminate the possible cause of your issue?
    Please update the result in the forum after you try the method above!
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

Maybe you are looking for

  • Itunes won't recognize iPod after installing MediaMonkey..

    Hi, I recently switched from Itunes to MediaMonkey, and I'm very happy. But my girlfriend still uses iTunes. And now her iTunes won't recognize neither her or my iPod when I connect either of them. Windows and MediaMonkey recognizes them perfectly. i

  • Data Recovery from TC 4gen drive

    HI, I just had problems with my TC, it shows "drive needs to be repaired" in Air Port Utility. After trying some backup via a connected USB drive (connected to TC) i did not succeeded so I just reinitialized the TC, keeping in mind using diskwarrior

  • ShowDetail TAB  --Disclosing

    Hi , I am facing some issue related with the tr:showdetailItem in which two tabs(say A and B) are provided. The requirement is on page load it should display always the content of TAB A and what is happening is on load sometimes it displays TAB A but

  • How do I get all two or three hours of a podcast ?

    With the new itunes 11.0.1 I can only get the first hour of a two and sometimes three hour podcasts? How do I get all two or three hours?

  • Want to display space in selection screen

    hi, I want to display some space between one select-option and ane checkbox. my coding is like SELECT-OPTIONS:   s_vstel FOR vekp-vstel. PARAMETERS:             p_dimen AS CHECKBOX DEFAULT ' '. any pointer.