我想連接到網站,過濾一些內容,然後將其放入字符串中,但我不知道如何執行此操作。將Android URL內容轉換爲字符串
public void zahlenLaden (View view) throws Exception {
URL oracle = new URL("http://www.blabla.de");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(
new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
//What I have to write here?
}
很好,非常感謝你! – Janjan
我很高興我幫你。 –