久久亚洲日韩精品一区二区三区,亚洲高清中文字幕免费,亚洲欧洲精品久久http://www.tkk7.com/stevenjohn/category/51107.html那些青春的歲月zh-cnSat, 21 Sep 2013 08:56:54 GMTSat, 21 Sep 2013 08:56:54 GMT60Java 下載文件http://www.tkk7.com/stevenjohn/archive/2013/09/21/404264.htmlabinabinSat, 21 Sep 2013 08:06:00 GMThttp://www.tkk7.com/stevenjohn/archive/2013/09/21/404264.htmlhttp://www.tkk7.com/stevenjohn/comments/404264.htmlhttp://www.tkk7.com/stevenjohn/archive/2013/09/21/404264.html#Feedback0http://www.tkk7.com/stevenjohn/comments/commentRss/404264.htmlhttp://www.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://www.tkk7.com/stevenjohn/archive/2012/03/31/373167.htmlabinabinSat, 31 Mar 2012 14:02:00 GMThttp://www.tkk7.com/stevenjohn/archive/2012/03/31/373167.htmlhttp://www.tkk7.com/stevenjohn/comments/373167.htmlhttp://www.tkk7.com/stevenjohn/archive/2012/03/31/373167.html#Feedback0http://www.tkk7.com/stevenjohn/comments/commentRss/373167.htmlhttp://www.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 發表評論
]]>
主站蜘蛛池模板: 黄色网址在线免费观看| 羞羞网站在线免费观看| 久久国产精品免费观看| 久久精品国产亚洲精品| 九九久久国产精品免费热6| 国产资源免费观看| 亚洲人成网站在线播放2019| 成人毛片免费在线观看| 亚洲精品无码你懂的| 免费无码又爽又高潮视频| 亚洲av无码日韩av无码网站冲| 天天看片天天爽_免费播放| 亚洲熟妇无码一区二区三区| 成年轻人网站色免费看| 日韩亚洲人成在线综合| 亚洲精品国自产拍在线观看| 精品久久久久久国产免费了| 久久亚洲国产伦理| 久久经典免费视频| 亚洲.国产.欧美一区二区三区| 日韩精品亚洲专区在线观看| 久久国产美女免费观看精品| 亚洲激情中文字幕| 黄瓜视频高清在线看免费下载| 真人无码作爱免费视频| 国产乱辈通伦影片在线播放亚洲| 国内少妇偷人精品视频免费| 亚洲三级中文字幕| 亚洲另类少妇17p| 久久久久久AV无码免费网站下载| 亚洲午夜一区二区三区| 亚洲AV无码专区日韩| 日韩精品免费在线视频| 亚洲乱码在线观看| 国产亚洲情侣一区二区无| 一级毛片aaaaaa免费看| 国产AV无码专区亚洲AV麻豆丫| 亚洲欧洲国产精品香蕉网| 亚洲免费中文字幕| 无遮挡呻吟娇喘视频免费播放| 亚洲国产精品免费视频|