アットウィキロゴ

分析((9

package datax;
 
import java.io.File;
import java.io.*;
import tool.*;   
 
public class pro {
 
    String[] subdata=new String[200000];
 
        int fastline,lastline;
        int indexline,creditline,prefline,subline;
        int creditx,credity;
    int[] month=new int[50000];
      String[] year=new String[50000];
      String[] pref=new String[500];
       String[] v=new String[500];
        String[] data=new String[500000];
      String date;
  int maxy,maxx,datanumber;
 int dicnumber;
 int number;
 
    public static void main(String[] args) {
        pro t=new pro();
    }
    pro(){
 
 
        readx("data.csv");
 
        String code="c322";
 
        int s,sx;
        sx=0;
        for(s=1;s<datanumber+1;s++){
        String[] x=data[s].split(",");
        if(x[1].indexOf(code)>-1)sx=sx+1;    
          if(x[1].indexOf(code)>-1)year[sx]=x[0];
        if(x[1].indexOf(code)>-1)pref[sx]=x[4];
          if(x[1].indexOf(code)>-1)v[sx]=x[5];
        }
 
        number=sx;
         for(s=1;s<number+1;s++){
         System.out.println(year[s]+","+pref[s]+","+v[s]);    
         }
 
 
 
 
 
 
 
    }
 
void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
for(s=1;s<datanumber+1;s++){  
pw.println(subdata[s]);
}
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
 
 
void readx(String file){
 
String str;
BufferedReader br;  
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));  
while((str = br.readLine()) != null) {  
s=s+1;
data[s]=str;  
}
br.close();
} catch (IOException e) {System.out.println(e);}  
 
datanumber=s;
 
} 
 
 
 
    }
 
最終更新:2017年02月20日 13:56