当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: private sub bcancle_click(byval sender as system.object, byval e as system.eventargs) handles bcancle.click dim dsaet1 as dataset = new dataset() sqldataadapter1.fill(dsaet1, "try") d......
    摘要: 说实话,我想做黑客~~~~~~~~~ 不是很强的那种,只要可以让一些人的ip坏掉就可以了, 但是我不知道要怎么去做,有人会教我吗? ......


BufferedReader类的问题高分有送

我生产了一个BufferedReader类,其是支持mark()   operation的(我用public   boolean   markSupported()测试返回true).  
  我的代码如下:  
  ...  
  BufferedReader   Bin=new   BufferedReader(ISR,1024)   ;  
  ...  
  String   readline=Bin.readLine();  
   
  if(readline.startsWith("DEFINTION"))  
  {  
    DEFINITION_string=readline+"\n";  
   
  do{  
  Bin.mark(512);  
  neadline=Bin.readLine();  
    if(!neadline.startsWith("ACCESSION"))DEFINITION_string+=neadline+"\n";  
  }while(!neadline.startsWith("ACCESSION"));  
  }  
   
  ....  
  用Bin.mark(512);   ....Bin.readLine();  
  时报错:java.lang.NullPointerException  
  为什么?  
  我要如河用mark何reset()?  
  谢谢,请给我些提示!  
 

NO.1   作者: bjzhanghao

neadline=Bin.readLine();也许返回null,当ISR被读完的时候,再接下来就空指针异常了。

NO.2   作者: vcvj

BufferedReader   Bin=new   BufferedReader(ISR,1024)   ;  
  ...  
  String   readline=Bin.readLine();  
   
  if(readline.startsWith("DEFINTION")   &&   readline!=null)  
   
   
  //或  
  BufferedReader   Bin=new   BufferedReader(ISR,1024)   ;  
  ...  
  String   readline;  
  ;  
   
  while((readline=Bin.readLine())){  
  if(readline.startsWith("DEFINTION")   &&   readline!=null)  
   
  //....  
  }  
 


    摘要: 各位大虾!下午好! 我在进行存储过程开发时,不知sqlserver2000中数组如何使用? 如果有了数组,那么功能就强多了,您看oracle8或9多强?自动支持数组等很 多功能! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE