reading the content from the input stream
Posted on 2004-09-17
I am trying to read a file in this format.
ISA*00* *00* *14*1234567890000 *01*123456789 *040626*0550*U*00304*190641071*0*P*>
The length of the first line is fixed ie 106 bytes
I want to read the whole secont line into a buffer from the inout stream.This length is not fixed.
I was able to do by
reading it from 106 + 1 position until we encounter the end of the line character.Then I found an issue with some of the files.some file have two end of the line character at end of each line.Can some one please give me your valueable solution to get through this situation and read the content of the second line into the string buffer successfully?