想知道这是怎么回事? 呵 ,看到我估计就是因为你在读取时候,line 本来就不是null。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可能是我这边的问题,具体是这样的。..................................................................................... public void setPath( String string ) { path = string; } public void closeFileObject() throws Exception { if( FR != null ){ FR.close(); } if( BR != null ){ BR.close(); } } public boolean exitFAQ( String username ) throws Exception { FR = new FileReader( path ); BR = new BufferedReader( FR ); String line = ""; boolean returnString = false; while( line != null ) { if( line.indexOf( username ) >= 0 ) { returnString = true; } line = BR.readLine(); } return returnString; }....................................................................................readDemo r = new readDemo();r.setPath( request.getRealPath( "/" ) + "data\\FAQ.txt" );if( r.exitFAQ( ( String )session.getAttribute( "login" ) ) ){//}....................................................................................可能是我这边的问题,thx oracle 调用java程序 点击href后如何执行js代码 JSP小白,送分简单问题问题 IE8和IE6的模态窗体刷新的问题 【急】请问如何实现同一个页面的输入与显示(预览),不用提交刷新之类的 Tomcat问题!!!!!!!!!!! 困惑:在线考试系统不同科目出的题型也不同的问题 送分题:如何在两个j2ee系统之间实现session互相激活! 表单按钮获取表单名 急、、看看这个我如何配置的、、、、、、 请问各位,昨日贴数,今天贴数,和最高日贴数,是怎么实现的 怎样去判断某个目录下有没有某个文件啊,,
.....................................................................................
public void setPath( String string )
{
path = string;
} public void closeFileObject() throws Exception
{
if( FR != null ){
FR.close();
}
if( BR != null ){
BR.close();
}
} public boolean exitFAQ( String username ) throws Exception
{
FR = new FileReader( path );
BR = new BufferedReader( FR );
String line = "";
boolean returnString = false;
while( line != null )
{
if( line.indexOf( username ) >= 0 )
{
returnString = true;
}
line = BR.readLine();
}
return returnString;
}
....................................................................................
readDemo r = new readDemo();
r.setPath( request.getRealPath( "/" ) + "data\\FAQ.txt" );
if( r.exitFAQ( ( String )session.getAttribute( "login" ) ) ){
//
}
....................................................................................
可能是我这边的问题,thx