How do i create a new line when writing to file

I am trying to write a few stings to a file but i cant get them to print on seperate lines. They all end up together. I tried to include the \n in the string but that didnt work. Any suggestions? I thought that this part would be simple.

http://forum.java.sun.com/thread.jsp?forum=54&thread=450725&tstart=0&trange=15

Similar Messages

  • How do i create a new line item (say 20) in reference to line item 10

    Hi all,
    I am trying to map a scenario where i want to create a new line item with reference to an existing line item. Where do i get this option in SD, and how could i go about it?
    Thanks & Regards
    Ravi

    > In ECC6 if u go to VA01 and enter the SP and SH,
    > Press Propose Item Icon, then one window will pop-up
    > asking for Sale Document Number, enter the Number and
    > select- selection list, there  u will get all the
    > line item of the Sale Doc. Select and copy Material
    Hi i am on SAP 4.7. How could be the same handled here?

  • How do I create a new playlist when all four options are not available

    I'm running iTunes 11.1.5 under Mavericks 10.9.2. Because I have a very large music collection I keep it on an external drive. I have six recorded lectures I'd like to sync with my iPad. How do I create a new playlist based on the recordings on the external drive? All four New Playlist options are currently not selectable. I know it can be done because I've done it before years ago but have forgotten how.
    Yes, I too wish iTunes were more coherent and less convoluted.
    Appreciated.

    Hi Try a Reboot press & hold power button & menu button hold both down until you see Apple Logo . Then go to music click on play list and try to make one. Cheers Brian

  • How do you create a new page when user checks a box?

    I guess it would be a check box.  I'm looking for a way to have the user select create a new page when the user runs out of space in the text box that is given.  So if its possible is there a way to create a new page with a continuing text box when the user has selected the create a new page check box.  Thanks.

    Hi,
    You can achieve this by just making some changes to the textfield (and the page layout).
    First, select the textfield and then in the Layout palette, tick 'expand' height to fit'. When you preview the form, you will see that as you type information into the field, a scroll bar will appear. When you exit the field, it will expand automatically to display the full contents.
    Now the problem will be that the textfield will expand over objects that are positioned below it - not good!
    So what you need to do is set up your form for a flowed layout. First select all of the objects that do not grow in size and wrap them inside a 'positioned subform'. When you select the subform you can see this setting in the Object > Subform palette. You should name the subforms in the hierarchy. So you will end up with a positioned subform above your textfield and a positioned subform beneath your textfield (if you have objects beneath it).
    Then select page1 in the hierarchy and in the Object > Subform palette, change the content to 'flowed'. Hopefully the layout won't change too much (because you will have most of your objects in their positioned subform).
    Last step is to select the textfield and in the Object > Field palette tick 'Allow page breaks within content'. This tells Acrobat/Reader to split the object if it overflows onto a new page.
    Now save the form as a Dynamic XML Form in the save as dialog and previewed it. Now when the textfield expands it will push objects beneath it down. Also when it gets to the bottom of the page, it will start a new page automatically and continue the content on the new page.
    Here is an example:
    https://acrobat.com/#d=kwa4t2vu6mXbgMCyqEF0aQ
    Paul Guerette is giving an online tech talk on dynamic forms on the 30 November, which I would recommend. Details here:
    http://acrobatusers.com/events/49326/tech-talk-developing-flowable-form-content
    Hope that helps,
    Niall

  • How do I create a new user, move my old files etc over, and delete old user

    This is why I think I need to.
    My computer got hit by lightening, and I may have created a new user account through netinfo rather than system preferences /accounts/+user. Mail used to open twice, but no longer. Now, Safari askes me for my keychain password twice, Spotlight can't find a folder on the computer when the search is restricted to folder and computer, though the folder is there and easyfind finds it, and when System Preferences/Spotlight/Privacy has the hard drive icon added, then deleted, Spotlight still does not find anything. (Yes, everything is backed up, on CD, DVD, and online.) Microsoft Tec Support says
    "Here is a summary of the key points of the case for your records.
    When you contacted us on August 8, you had requested assistance with Microsoft Office 2004, as your installation of the updates was unable to find the correct version of the software to update. After creating a New MAC User, we identified the issue to be with a corrupt MAC User account, and not a Microsoft issue. "
    I believe Microsoft. So, creating a new user was easy.
    But copying files uses up too much hard drive (movies, music), and may miss keychains, preferences, mail, address book, and documents. Since Spotlight no longer works, who knows what is happening. (Yes, I've repaired persmissions, and disk repair. No change). I'm using up my hard drive trying to move files to the new user. If I share files, or put them into a public folder, then delete the old user, will I still have the old user's files in the new user's account? It is not clear to me what I should be trying to do in order to create a new user, move my old files etc over, and delete old user. Thanks.
    My responses will be slow, because I have to drive to town to use the internet. I've ordered a new airport which may take care of that problem. SO be patient.

    Hey -
    I need to do the EXACT same thing, but have no idea how. Has anyone out there done this?
    My situation is a tad different..this is a new Mac (and I'm a brand new Mac user). Tons of querks occur under my original account (videos won't run, Safari won't support certain plug-ins). I spent 6 hours on the phone w/ 4 different Apple Reps and nobody could fix it. A rep finally looked at my MacBook Pro in person today. He created a new account just to see if that would work and under that new account, everything works perfectly fine (no querks, can view video). He tried switching a million settings in my original account to no avail.
    He said to create a new account (as he did) and move my files over to the new account and then go back to the original and delete it. How do you do this?! I can't figure it out! I've got a new account created, but of course it just has the default folders in it w/ the little red icons next to them! Thanks in advance!

  • How to write on a new line ("\n") to a file

    I dont know how to write on a new line ... this method writes everything in long line. I tried doing pS.println("\n") before the pS.println(buffer.toString());
    Some one please direct me :)
    public void WriteToFile() {
         try {
              byte[] record = new byte[100];
              ByteArrayInputStream iS = new ByteArrayInputStream(record);
             DataInputStream iDS = new DataInputStream(iS);
              StringBuffer buffer = new StringBuffer();
              OutputConnection connection = (OutputConnection)
                                          Connector.open("file:///CFCard/readme.txt");
              OutputStream oS = connection.openOutputStream();
              PrintStream pS = new PrintStream( oS );          
              try {
               for(int x=1; x<=rs.getNumRecords();x++) {
               rs.getRecord(x, record, 0);                                                                                               
                  buffer.append(iDS.readUTF());                          
                  buffer.append(iDS.readUTF());              
                  buffer.append(iDS.readInt());              
                  buffer.append(iDS.readInt());              
                  buffer.append("\n");
                  pS.println("\n");
                  pS.println(buffer.toString());                                          
                 iS.reset();                   
              oS.close();
              connection.close();
             iS.close();
             iDS.close();        
              catch(ConnectionNotFoundException err) {
                   Alert alert = new Alert("Error", "Cannot access file.", null, null);
                 alert.setTimeout(Alert.FOREVER);
                 alert.setType(AlertType.ERROR);
                 display.setCurrent(alert);     
              catch(IOException err) {
              Alert alert = new Alert("Error", err.toString(), null, null);
            alert.setTimeout(Alert.FOREVER);
            alert.setType(AlertType.ERROR);
            display.setCurrent(alert);     
              Alert alr = new Alert("Completed Sending to a File", "Data written successfully!",null,null);
              alr.setTimeout(Alert.FOREVER);
              alr.setType(AlertType.WARNING);
              display.setCurrent(alr);
              }catch(Exception err) {
    }

    Stinkin' crossposter
    http://forum.java.sun.com/thread.jspa?threadID=613784

  • How do i create a new table from a *.sql file in JSP

    <html>
    <%@ page language="java" import="java.sql.*" %>
    <%@ page errorPage="ExceptionHandler.jsp" %>
    <%
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    String dbUrl = "jdbc:mysql://localhost/test?user=root";
    Connection conn = DriverManager.getConnection(dbUrl);
    Statement stmt = conn.createStatement();
    stmt.executeUpdate("\\. addresses.sql");
    %>
    how would i create a table from the addresses.sql file?

    stmt.executeUpdate("\\. addresses.sql");This, of course, will not work.
    You might even execute it the same way you do from command line with some Runtime.exec() jugglery but I would suggest you to work with my first suggestion unless someone else came up with something better.

  • How do I create a new line in a pdf document?

    Hello,
    What I am doing is taking a compilation of information from multiple tables, displaying it in a textarea, allowing a user to change the information that is present in the text area if they wish, and then allowing them to create a pdf file. I am able to do everything except that when the pdf file is created, there is no new like created when the pdf doc is created. I can display multiple lines by using:
    <textarea name="all_content" cols="100" rows="30"><?php
            echo $row_getAllCont['first_name'].' '.$row_getAllCont['last_name']."\n";
            echo $row_getAllCont['email'];
            ?></textarea>
    <?php $_POST['all_content'] = nl2br($_POST['all_content']); ?>
    Then create the pdf doc by using:
    $newpdf = pdf_new();
    pdf_open_file($newpdf, "");
    pdf_set_info($newpdf, "Creator", "Me");
    pdf_set_info($newpdf, "Author", "Me");
    pdf_set_info($newpdf, "Title", "Tryal");
    pdf_set_info($newpdf, "Subject", "tryal");
    pdf_begin_page($newpdf, 595, 842);
    $newfont = pdf_findfont($newpdf, "Times-Roman", "host", 0);
    pdf_setfont($newpdf, $newfont, 10);
    pdf_show_xy($newpdf, $_POST['all_content'], 50, 750);
    pdf_end_page($newpdf);
    pdf_close($newpdf);
    $newbuf = pdf_get_buffer($newpdf);
    $newlen = strlen($newbuf);
    header("Content-type: application/pdf");
    header("Content-Length: $newlen");
    header("Content-Disposition: inline; filename=gen06.pdf");
    print $newbuf;
    pdf_delete($newpdf);
    ?>
    The problem is, when I want to display the first name and last name, and then email in the pdf, I want the email to display on another line only if email isn't set to NULL. I can get it to display in a webpage using the nl2br function but that doesn't work in pdf. Any ideas how to make this work?
    Thanks,
    Kelsey

    Hi Robert,
    Welcome!
    I see you are subscribed to our PDF Pack service.
    Check out this FAQ to help get you started!
    Let me know if this helps.
    Looking forward to hearing back from you!
    Kind regards, Stacy

  • Return key not creating a new line when using the horizontal text tool

    Going through the adobe after effects 'classroom in a book' examples - when writing a line of single line using the horizontal text tool pressing return does not create the next line underneath, the cursor stays on the same line?
    Anybody out there had this problem?

    Hi Bill
    Thanks for replying!
    My OS is windows 7. I think it is the first time I have needed to put more than one line of text in an after effects layer. I am new to CS5.5 - after effects and I'm going through an adobe tutorial  'classroom in a book' series book.
    I thought about using a paragraph text box as you suggest but could not find the function in the tools menu.
    I have since tried clearing the cache out and restoring default layout but with no joy.
    I have used the return key for multiple line text in premier pro and it works perfectly ok.
    Cheers,
    Alan

  • How do I create a new folder in my documents?

    Hi there, I'm new on Mac.
    How do I create a new folder when I want a new folder in my documents?
    I also want to create folders on an extern harddrive, but I can only create a folder on the launchpad...

    See my orginal post - it answered the OPs question just fine:
    When you have any window open, you can press the Shift-Command-N keys to create a new untitled folder. Same with on an external hard drive. Also works on the Desktop.
    Maybe I should have said, to your reply:
    "and you don't have to open any windows to use the command on the Desktop."
    Would that have worked for you?
    Clinton

  • Text file - carriage return, creating a new line

    anyone know how to create a new line in a text file, something which is the text file equivelent of a BR (html) tag.

    in windows it's "\r\n"
    in linux/unix/bsd it's "\n"
    but the best way to do it is
    //this will return the newline character for whatever
    //platform your program is running on
    System.getProperty("line.separator");

  • Force a new line when editing a SMS

    Does anybody know how I can force a new line when editing a SMS for instance,
    Starting the SMS with:
    Dear xxx
    Now I start editing the SMS on a new line....
    Solved!
    Go to Solution.

    Press the 0 button 3x times quickly usually works for me.
    S.
    History: Motorola MR30, Nokia: 7110, 7650, N70, N80, N82, X6 (32GB), Samsung Galaxy SII
    Current: Samsung Galaxy Note3 Black

  • How can i go to new line

    How can i go to new line when iam writing data to a file by using write to spraedsheet file.vi every time.i mean i would like to go to newline everytime.

    Take a look at the attached code. I am writing a 2-D array to the file using the default method so it looks like
    1 2 3
    4 5 6
    7 8 9
    in the file.
    I then use the Line Feed Constant as a delimiter, and you can see it then looks like
    1
    2
    3
    4
    5
    6
    7
    8
    9
    The line feed and carriage return constant is on the String Pallette.
    Attachments:
    WriteSpreadSheet.vi ‏19 KB

  • How to insert new line in a text file

    hi all,
    i wnat to know how can i insert a new line in a text file using java.
    for example i want the formate of the text like this
    1 2 3
    4 5 6
    until now i know only how to insert data but not new line.
    Thanks in advandce

    Hi you can put a new line in a text file using System.getProperty("line.separator"). This implementation will work for every OS.
    import java.io.*;
    class Demo{
    public static void main(String args[]) throws Exception {
    FileWriter fr = new FileWriter("FileDemo.txt");
         fr.write("AAAAAAAAAA");
    fr.write(System.getProperty("line.separator"));
    fr.write("AAAAAAAAAAA");
    fr.close();
    }

  • How to create a new line in label in Xcode

    How to create a new line in label. for example I have two buttons & one label. when i press first button, l want to change the label text to "Hello World". then when I press the second button, on the same label I need to display"Good Bye" on the next line in xcode 5?
    I want to display the lablel like below:
    Hello World
    Good Bye

    I am using Xcode to develop an app for iOS.
    I tried using multi-line label & belwo is my code.
    - (IBAction)change:(UIButton *)sender {
        self.Screen.text = @"\nHello World";
    - (IBAction)newChange:(UIButton *)sender {
          self.Screen.text = @"\nGood bye";
    everytime when i pressed the button, it replacing the whold lable text instead of adding the second line.

Maybe you are looking for

  • Macbook and projectors

    I want to buy a new projector: there are many projectors out there and I'm interested in an HD projector. On this site (http://www.projectorcentral.com/home-theater-multimedia-projectors.htm) I found what I want but there is a question. What appens i

  • Info record and source list

    Hi We have two info records for one material and source list is not being maintained. What will be the implications in this scenario?? Regards Chitra

  • How to Reprocess Outbound Idocs in Status 02 (Errors)

    Hi,     I have an urgent problem. How do I re-process an Outbound IDoc in Status '02' (Error Passing Data to Port)     I have tried reprocessing this IDoc through BD87 using both the options Edit>Process and Edit>Restrict and Process, but it doesn't

  • Linking songs to multiple albums

    Is there anyway that you can link a song to multiple albums in your iTunes library? I find that I often have songs that appear on several different albums - for instance they may appear on the original studio album, but then also appear on Greatest H

  • Unable to Translate the EDIFACT messages in Oracle B2B 11g

    Hello,     I am trying to read a EDIFACT message using B2B and translate into XML. I have Created the .ecs file and also created .xsd file out of it . I imported both the definitions in B2B  and created a inbound agreement. I placed an EDIFACT file a