アットウィキロゴ

buc

package mag;
 
import tool.*;
import java.io.*;
 
public class pro {
 
    int s,datanumber;
    String[] data=new String[5000];
  String[] subdata=new String[50000];
     String[] date=new String[5000];
    String[] subdate=new String[50000];
 
    public static void main(String[] args) {
        pro te=new pro();
    }
    pro(){
 
        readfile sub=new readfile();
        sub.makedata("s.csv","UTF-8");
        data=sub.data;
        datanumber=sub.datanumber; 
 
         for(s=1;s<datanumber+1;s++){
      int p1=data[s].indexOf("-");
       p1=data[s].indexOf("-",p1+1);
      int p2=data[s].indexOf("-",p1+1);
      date[s]=data[s].substring(p1,p2);
       System.out.println(date[s]);
         }
 
        int delta=datanumber;
 
 
        int tr,sx;
        sx=0;
        for(tr=1;tr<delta+1;tr++){
 
         readfile sub7=new readfile();
        sub7.makedata("gdata/"+tr+".txt","UTF-8");
        data=sub7.data;
        datanumber=sub7.datanumber; 
 
        for(s=1;s<datanumber+1;s++){
             if(data[s].length()>0)sx=sx+1;
            if(data[s].length()>0)subdata[sx]=data[s];
                  if(data[s].length()>0)subdate[sx]=date[tr]; 
        }
 
 
 
 
 
 
        }
 
 
 
        datanumber=sx;
 
        writexml("ren.txt");
 
 
    }
 
     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.print(subdate[datanumber-s+1]); 
     pw.print(",");
    pw.println(subdata[datanumber-s+1]); 
}
 
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
}
 
最終更新:2016年08月11日 02:30