参数为读取的文件名,中文为双字节,我想substring里面的参数应该为2,没有测试,也可能为1。a即为title,b即为content public void filtrate(File news)
{
try
{ BufferedReader tfile=new BufferedReader(new FileReader(news));
String addressLine="";
String title="";
String content="";
while ((addressLine=tfile.readLine())!=null)
{
title=addressLine.substring(0,2);  //可能为1
content=addressLine.substring(2);    //可能为1

}
tfile.close();
}
catch(FileNotFoundException excpt)
{ writeLog("Unable to find file:"+excpt);
}
catch(IOException excpt)
{ writeLog("Failed I/O of file:"+excpt);
}
}