Parsing a fixed-width formatted file in Java

后端 未结 10 2010
遥遥无期
遥遥无期 2020-11-28 10:51

I\'ve got a file from a vendor that has 115 fixed-width fields per line. How can I parse that file into the 115 fields so I can use them in my code?

My first thought

10条回答
  •  Happy的楠姐
    2020-11-28 11:33

    I would use a flat file parser like flatworm instead of reinventing the wheel: it has a clean API, is simple to use, has decent error handling and a simple file format descriptor. Another option is jFFP but I prefer the first one.

提交回复
热议问题