アットウィキロゴ

skudex

package slidex;
 
import tool.*;
import java.io.*;
 
public class pro {
int number;
    int s,datanumber;
    String[] data=new String[700];
  String[][] subdata=new String[400][6]; 
 
 
    public static void main(String[] args) {
        pro t=new pro();
    }
    pro(){
 
 
    readfile sub3=new readfile();
   sub3.makedata("ren.txt","SJIS");
   data=sub3.data;
   datanumber=sub3.datanumber;
 
   int s1,s2;
   s1=1;
   s2=0;
   for(s=1;s<datanumber+1;s++){
   s2=s2+1;
   if(s2>5)s1=s1+1;
   if(s2>5)s2=1;
   subdata[s1][s2]=data[s];       
   System.out.println(data[s]);
   }
 
   number=s1;
 
   writexml("data.txt");
 
 
 
 
 
 
 
 
    }
 
 
    void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
for(s=1;s<number+1;s++){  
pw.println("<section>"); 
for(sx=1;sx<6;sx++){ 
pw.print("<p>"); 
pw.print(subdata[s][sx]);  
pw.println("</p>"); 
}
pw.println("</section>"); 
}
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
 
 
}
 
最終更新:2016年05月09日 20:59