Created
November 12, 2013 06:32
-
-
Save pawelkw/7426460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalendarActivity extends Activity { | |
... | |
protected void onCreate(Bundle savedInstanceState) { | |
try { | |
URL url = new URL("http://www.google.com"); | |
HttpURLConnection con = (HttpURLConnection) url.openConnection(); | |
readStream(con.getInputStream()); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
private void readStream(InputStream in) { | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment