How to parse this output and separate each field/word

前端 未结 3 851
醉话见心
醉话见心 2021-01-22 18:12

This is Akshatha. I\'m stuck in parsing the following data. I want to fetch each word individually. Can I have a sample code so that I can proceed

 RTRV-HDR   RH         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-22 18:54

    Use BufferedReader to read your file (or input stream) thusly.

    Then use StringTokenizer to split each line into tokens thisly

    I'm not providing a ready-to-use code here because I think you'd learn better by combining the above examples into a working code yourself.

提交回复
热议问题