package pdf;
import java.io.*;
import java.net.*;
public class pro {
String urlx;
String[] data=new String[5000];
int s,datanumber;
public static void main(String[] args) {
pro test=new pro();
}
pro(){
urlx="http://www.mlit.go.jp/k-toukei/search/pdf/13/13201302x00000.pdf";
try{
URL url = new URL(urlx);
InputStream in = url.openStream();
OutputStream out = new FileOutputStream("cc.pdf");
try {
byte[] buf = new byte[1024];
int len = 0;
while ((len = in.read(buf)) > 0){
out.write(buf, 0, len);
}
out.flush();
} finally { out.close(); in.close(); }
} catch(Exception e) { System.err.println(e); }
}
}
最終更新:2014年03月08日 08:40