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 2 of 2

Thread: EOF reached before encapsulated token finished

  1. #1
    Junior Member
    Join Date
    Jan 2023
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default EOF reached before encapsulated token finished

    Hi...
    I have a vary large csv file which I am splitting it into 2 files using RandomAccessFile. BufferedOutuputStream so that it will be easier to parse small size file. No problems till here.

    But as the last line of the large file is getting splitted (1st half line in 1st splitfile and 2nd half line in 2nd split file), while parsing the splitted files I am getting this error. IOException: EOF reached before encapsulated token finished.

    Example:
    Last line in original CSV file is -- "Regular Emp","43215","Phani Kiran .inc","Low", "High", "NOW"

    After split:
    Line in 1st Split file is -- "Regular Emp","43215","Phani Kir

    Line in 2nd Split is -- an .inc","Low", "High", "NOW"

    Please help me resolving this.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: EOF reached before encapsulated token finished

    Have you tried asking Google about this problem? It has lots of suggested solutions.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. encapsulated in java
    By annaphiri101 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 28th, 2014, 04:42 PM
  2. Replies: 2
    Last Post: September 28th, 2013, 07:36 PM
  3. Static void is not being reached
    By fantity in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 1st, 2013, 11:17 PM
  4. Syntax error on token ";", { expected after this token please HELP
    By Creeper in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 1st, 2012, 03:12 PM
  5. Syntax error on token ";", @ expected after this token
    By MagicMojo in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 16th, 2011, 07:48 AM