import java.io.*;
import java.net.URLEncoder;
class bing{
int xmlnumber;
String urlx,file;
String[] data=new String[5000];
String str,word;
int page,s,datanumber;
public static void main(String [] args) {
bing test=new bing();
}
bing(){
word="私は犬が好きです。";
urlx="";
try{
str = URLEncoder.encode(word,"utf-8");
urlx="http://api.microsofttranslator.com/V2/Ajax.svc/Translate?";
urlx=urlx+"Appid=74CEFBBE8EC8FBBFBEB6C18B829621A1B7EF33EE";
urlx=urlx+"&text="+str;
urlx=urlx+"&from=ja&to=en";
}catch(Exception e) { System.err.println(e); }
getdata g=new getdata();
g.makedata(urlx);
data=g.data;
datanumber=g.datanumber;
for(s=1;s<datanumber+1;s++){
System.out.println(data[s]);
}
}
}
最終更新:2011年07月09日 12:22