下载此文档

java通讯录源代码.doc


文档分类:IT计算机 | 页数:约7页 举报非法文档有奖
1/7
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/7 下载此文档
文档列表 文档介绍
;;;;;;;;lassAddList{  privateStringfilePath=""; privateStringbakPath=""; privateStringcontent="";  Scannersc=newScanner();  publicStringreadFile(){ content=""; if(isNull(filePath)){  ("文件存储路径:");  filePath=(); } Filefile=newFile(filePath); FileReaderfr=null; try{  if(()){  fr=newFileReader(file);  char[]chars=newchar[1024];  intn=0;  while((n=(chars))!=-1){   Stringstring=newString(chars,0,n);   content=content+string;  }  }else{  ("文件不存在");  } }catch(Exceptione){  (); }finally{  if(fr!=null){  try{   ();  }catch(IOExceptione){   ();  }  } } returncontent; }  publicvoidwriteFile(Stringpath){ Filefile=newFile(path); FileOutputStreamfos=null; mkDirs(path); try{  fos=newFileOutputStream(file);  BufferedOutputStreambos=newBufferedOutputStream(fos);  PrintWriterpw=newPrintWriter(bos,true);  (content);  (); }catch(FileNotFoundExceptione){   (); }finally{  if(fos!=null){  try{   ();  }catch(IOExceptione){   ();  }  } } }  publicvoidwriteFile(){ if(isNull(filePath)){  

java通讯录源代码 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数7
  • 收藏数0 收藏
  • 顶次数0
  • 上传人精品小课件
  • 文件大小23 KB
  • 时间2020-08-25