Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: How do I parse an input file in two parts?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I parse an input file in two parts?

    I need to parse an input file such as this in two parts..this is just an example file the file can vary but is very similar

    Short simulation
    5
    2
    S
    45
    35
    1 30
    5 35
    3 45
    1 60
    1 90
    END

    I want to parse this first and take in these values
    Short simulation
    5
    2
    S
    45
    35

    and the second half i want to parse separately
    1 30
    5 35
    3 45
    1 60
    1 90
    END


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How do I parse an input file in two parts?

    What did you try? Break the problem down, and describe which part exactly are you having trouble with as there can be a great number of things (reading, writing, parsing?)

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How do I parse an input file in two parts?

    reading the file...i can read the entire file but i don't know how to parse it in two parts

  4. #4
    Junior Member
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How do I parse an input file in two parts?

    To make it clearer I want to take in the first half of the file input separately from the second half and take in the second half of the file input separately

  5. #5
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: How do I parse an input file in two parts?

    You want to discuss it theoretically or you want to implement it or YOU WANT US TO IMPLEMENT?

Similar Threads

  1. how to get value path file from jsp form- input type file
    By meeGoreng in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: October 4th, 2011, 12:05 AM
  2. HOW TO PARSE A TEXT FILE
    By hervebags in forum Algorithms & Recursion
    Replies: 4
    Last Post: June 1st, 2011, 09:36 AM
  3. Read a text file and parse the contents of file
    By HelloAll in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: March 3rd, 2011, 05:47 AM
  4. [SOLVED] parse txt file
    By maliv in forum File I/O & Other I/O Streams
    Replies: 16
    Last Post: November 17th, 2010, 03:54 PM
  5. Replies: 8
    Last Post: January 6th, 2010, 09:59 AM