Advertisement
Guest User

et ça craaash ^^

a guest
Sep 15th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public String demandeA() {
  2. try {
  3. URL oracle = new URL("http://aenavette.be/Admin/jour.php");
  4. URLConnection yc = oracle.openConnection();
  5. BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
  6. String inputLine;
  7. while ((inputLine = in.readLine()) != null) {
  8. Log.d("dl", inputLine.toString());
  9. }
  10. in.close();
  11. return "okay";
  12. }
  13. catch (MalformedURLException e) {
  14. // new URL() failed
  15. // ...
  16. return "ouch";
  17. }
  18. catch (IOException e) {
  19. // openConnection() failed
  20. return "ouch";
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement