久久亚洲日韩精品一区二区三区,亚洲高清中文字幕免费,亚洲欧洲精品久久http://m.tkk7.com/stevenjohn/category/51107.html那些青春的歲月zh-cnSat, 21 Sep 2013 08:56:54 GMTSat, 21 Sep 2013 08:56:54 GMT60Java 下載文件http://m.tkk7.com/stevenjohn/archive/2013/09/21/404264.htmlabinabinSat, 21 Sep 2013 08:06:00 GMThttp://m.tkk7.com/stevenjohn/archive/2013/09/21/404264.htmlhttp://m.tkk7.com/stevenjohn/comments/404264.htmlhttp://m.tkk7.com/stevenjohn/archive/2013/09/21/404264.html#Feedback0http://m.tkk7.com/stevenjohn/comments/commentRss/404264.htmlhttp://m.tkk7.com/stevenjohn/services/trackbacks/404264.html
   try {
            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
            response.setHeader("Content-Disposition", "attachment; filename=" +teamQuery.getTeamId()+ new String(" 項目銷量.xls".getBytes("gbk"), "iso8859-1"));
            Boolean flag = manteamService.downFile(teamQuery,response.getOutputStream());
            if (flag) {
                resutMap.put("success", true);

            }

        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (IOException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
一定要有response.getOutputStream()


abin 2013-09-21 16:06 發表評論
]]>
統計某一目錄下每個文件中出現的字母個數、數字個數、空格個數及行數(JAVA) http://m.tkk7.com/stevenjohn/archive/2012/03/31/373167.htmlabinabinSat, 31 Mar 2012 14:02:00 GMThttp://m.tkk7.com/stevenjohn/archive/2012/03/31/373167.htmlhttp://m.tkk7.com/stevenjohn/comments/373167.htmlhttp://m.tkk7.com/stevenjohn/archive/2012/03/31/373167.html#Feedback0http://m.tkk7.com/stevenjohn/comments/commentRss/373167.htmlhttp://m.tkk7.com/stevenjohn/services/trackbacks/373167.htmlpackage com.abin.lee.test;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class FileTotal {
 
 public static void ReadSubdirectory(File dir){
  if(dir.isDirectory()){
   File[] subFile=dir.listFiles();
   for(int i=0;i<subFile.length;i++){
    if(subFile[i].isDirectory()){
     ReadSubdirectory(subFile[i]);
    }else{
     ReadSubFile(subFile[i]);
    }
   }
  }
 }
 public static void ReadSubFile(File file){
  int numCount=0;
  int letterCount=0;
  int spaceCount=0;
  int lineCount=0;
  int temp=0;
  try {
   FileInputStream input=new FileInputStream(file);
   while((temp=input.read())!=-1){
    if(temp>=48&&temp<=57){
     numCount++;
    }else if((temp>=65&&temp<=90)||(temp>97&&temp<122)){
     letterCount++;
    }else if(temp==32){
     spaceCount++;
    }
   }
   BufferedReader buffer=new BufferedReader(new InputStreamReader(new FileInputStream(file)));
   while(buffer.readLine()!=null){
    lineCount++;
   }
   System.out.println("文件路徑:"+file.getAbsolutePath());
   System.out.println("數字個數:"+numCount);
   System.out.println("字母個數:"+letterCount);
   System.out.println("空格個數:"+spaceCount);
   System.out.println("行數數:"+lineCount);
   
  } catch (Exception e) {
   e.printStackTrace();
  }
 }
 public static void main(String[] args) {
  ReadSubdirectory(new File("D://image"));
 }
}



abin 2012-03-31 22:02 發表評論
]]>
主站蜘蛛池模板: 黄色网址在线免费| 国产成人亚洲精品影院| 精品一卡2卡三卡4卡免费视频| 亚洲精品无AMM毛片| 久久亚洲精品中文字幕无码| 永久黄网站色视频免费直播| 久久A级毛片免费观看| 国产精品高清免费网站| 亚洲色丰满少妇高潮18p| 97se亚洲综合在线| 亚洲精品午夜无码电影网| 免费一区二区三区四区五区| 一本无码人妻在中文字幕免费| 一个人免费视频观看在线www | 7x7x7x免费在线观看| 成年免费a级毛片免费看无码| 日韩亚洲人成在线综合| 亚洲综合中文字幕无线码| 78成人精品电影在线播放日韩精品电影一区亚洲 | 爱爱帝国亚洲一区二区三区| 亚洲综合一区国产精品| 亚洲av一本岛在线播放| 久久精品亚洲精品国产色婷| 亚洲AV无码久久精品蜜桃| 中文亚洲AV片不卡在线观看 | 久青草国产免费观看| 国产亚洲精品欧洲在线观看| 亚洲av第一网站久章草| 国产精品亚洲精品青青青| 亚洲福利一区二区精品秒拍| 亚洲国产精品久久久久网站| 久久精品国产精品亚洲精品| 亚洲色欲色欲www在线丝| 人人狠狠综合久久亚洲婷婷 | 67194国产精品免费观看| 一级毛片免费毛片一级毛片免费 | 亚洲国产国产综合一区首页| 亚洲精品白浆高清久久久久久| 国产成人精品日本亚洲专区 | 青青草国产免费国产是公开 | 亚洲电影在线免费观看|