it's quite difficult to directly operate that text file.
Even if your text file has a logical structure, it's still difficult. 
In fact, you can import that text file into a certain database table and then operate the table. That will be much easier and convenient.

解决方案 »

  1.   

    yes,database or xml are very good way to operate on this kind of informationbut if you still want to parse plain text file.you have to write your own parser in javajust likeString s=in.readline();if(s.indexOf("some String")!=-1){  your code here !!!}
    else if(s.indexOf(" other String")!=-1) { }
      

  2.   

    如果不是Text文件,你就可以用java的RandomFileAccess类来实现
      

  3.   

    你应该使用数据库来实现java对文件的IO操作速度会很慢,而且你的那个文件不一定有严谨格式方便java去读写你完全可以使用javabean去调用数据库完成你所需要的功能