Hello developers,
I'm french, so I'm sorry for my english.
I would like to develope an application whose extracts some numbers
from a web site
In JAVA, I read the HTML file with this method :
-------------------------------------------------------------------------------------------------------
public static String get(String adresse) {
String toreturn = null;
try {
URL url = new URL(adresse);
URLConnection uc = url.openConnection();
InputStream in = uc.getInputStream();
int c = in.read();
StringBuilder build = new StringBuilder();
while (c != -1) {
build.append((char) c);
c = in.read();
}
toreturn = build.toString();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return toreturn;
}
-------------------------------------------------------------------------------------------------------
But it doesn't work in ANDROID.
the method return nothing.
thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---