アットウィキロゴ

しょうしょく

package book;
import java.io.*;
import java.io.IOException;
import java.io.InputStreamReader;
import tool.*; 
 
 
public class pro {
 
 String[] data=new String[60000];
    int s,datanumber;
    String[] name=new String[6000];
      String[] code=new String[60000];
      String[] credit=new String[60000];
 
      String[] subdata=new String[60000];
 
    public static void main(String[] args) {
        pro te=new pro();
    }
 
    pro(){
 
         readx("ren.txt");
 
         code[s]="0";
         for(s=1;s<datanumber+1;s++){
 String[] x=data[s].split(",");
 code[s]=x[0];
 credit[s]=credit[s-1];
 if(data[s].indexOf("○")>-1)credit[s]=x[1];
 int h=0;
 if(code[s].equals(code[s-1]))h=100;
 if(h<50)credit[s]="出演者";
 subdata[s]="";
 if(x.length>1)subdata[s]=code[s]+","+credit[s]+","+x[1];
         }
 
 
         int sx=0;
          for(s=1;s<datanumber+1;s++){
         String[] x1=subdata[s].split(",");
         String z="";
         if(x1.length==3)z=x1[2]; 
         if(z.indexOf("○")>-1)subdata[s]="";
         if(subdata[s].length()>0)sx=sx+1;
          if(subdata[s].length()>0)data[sx]=subdata[s];
          }   
 
 
 
         writefile sub2=new writefile();
         sub2.data=data;
         sub2.datanumber=sx;
         sub2.makedata("data.csv");
 
 
 
    }
 
    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月10日 19:04