Created
January 23, 2015 01:32
-
-
Save phase/42b17702bba724d08582 to your computer and use it in GitHub Desktop.
Gets the contents of a site.
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
URL url = new URL("http://www.website.com/"); | |
BufferedReader br = new BufferedReader( | |
new InputStreamReader( | |
url .openStream())); | |
String line; | |
String contents; | |
while ((line= br.readLine()) != null) | |
contents += line + "\n"; | |
in.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment