这是我的代码:我正在使用我的系统的 IP 地址,其中包含 listofitems.txt 文件:
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)的系统。请帮忙!!!谢谢你!!!