0
這是我的代碼: 我用我的系統的IP地址包含listofitems.txt文件:如何從遠程系統讀取.text文件,然後將其寫入Android數組字符串中?
try {
Create a URL for the desired page
String ipadd=ip.getText().toString();
URL url = new URL("http://192.168.1.2/listofitems.txt");
// Read all the text returned by the server
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str = in.readLine();
String[] items = new String[]{
items = str.split(",");
in.close();
} catch (MalformedURLException e) {
} catch (IOException e) {
}
我必須連接到無線路由器(WLAN)系統的平板電腦。 請幫忙!!!謝謝!!!
嘿感謝名單了很多!這就像魔術!!!!! – amg 2012-08-09 10:48:13
你的意思是:'String [] items = all.split(「,」);'on line 14? – 2014-08-01 08:01:12