Created
July 14, 2015 15:05
-
-
Save davidllorca/59de9bb45d5385485dc8 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
try { | |
URL url = new URL("http://myserver.com/myservice"); | |
StringBuffer strBuff = new StringBuffer(); | |
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "ISO-8859-1")); | |
String str; | |
while((str = in.readLine()) != null){ | |
strBuff.append(str); | |
} | |
in.close() | |
} catch (Exception e){ | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment