Back to project page NewAndroidTwitter.
The source code is released under:
Apache License
If you think the Android project NewAndroidTwitter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.londatiga.android.twitter.util; //from www .j av a2s . co m import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; /** * String utils. * * @author Lorensius W. L. T <lorenz@londatiga.net> * */ public class StringUtil { public static String streamToString(InputStream is) throws IOException { String str = ""; if (is != null) { StringBuilder sb = new StringBuilder(); String line; try { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); while ((line = reader.readLine()) != null) { sb.append(line); } reader.close(); } finally { is.close(); } str = sb.toString(); } return str; } }