アットウィキロゴ

だうん こくみん

package api2;
import tool.*;
import java.io.*; 
 
public class pro {
 
   int s,datanumber;
    String[] data=new String[50000];
     String[] id=new String[5000];
     String[] name=new String[5000];
       String[] tab=new String[5000];
     int number;
 
    public static void main(String[] args) {
        pro t=new pro();
    }
    pro(){
 
 
 
 
 
 
 
 
    String code="0003110914";    
 
   String urlx="http://api.e-stat.go.jp/rest/2.1/app/getStatsData?appId=aeec3b02995623cad42b80c80f73d176b7c77970";
   urlx=urlx+"&statsDataId="+code;
 
 
   getdata sub=new getdata();
   sub.makedata(urlx,"UTF-8");
   data=sub.data;
   datanumber=sub.datanumber;
 
 
  writefile sub3=new writefile();
  sub3.datanumber=datanumber;
  sub3.data=data;
  sub3.makedata("ren.txt");
 
 
 
 
 
    }
 
     void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
pw.println("n,t,c"); 
for(s=1;s<number+1;s++){  
pw.print(name[s]); 
pw.print(","); 
pw.print(tab[s]);  
pw.print(","); 
pw.println(id[s]); 
}
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
 
}
 
最終更新:2017年03月04日 00:44