Created
February 1, 2012 22:16
-
-
Save PanosJee/1719818 to your computer and use it in GitHub Desktop.
oss-android-2
This file contains hidden or 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 static String ReadInputStream(InputStream in) throws IOException { | |
StringBuffer stream = new StringBuffer(); | |
byte[] b = new byte[4096]; | |
for (int n; (n = in.read(b)) != -1;) { | |
stream.append(new String(b, 0, n)); | |
} | |
return stream.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment