Back to project page MobileCodeGenerator.
The source code is released under:
GNU General Public License
If you think the Android project MobileCodeGenerator 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 it.polimi.multimedia; //from ww w . ja v a 2 s .c o m import java.io.*; public final class Utils { /** * Returns the text (string) contained in the Input Stream passed as parameter * @param inputStream * @return string */ public static String fromInputStreamToString(InputStream inputStream) { BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream)); String readLine = ""; StringBuilder stringBuilder = new StringBuilder(); try { while ((readLine = bufferedReader.readLine()) != null) { stringBuilder.append(readLine); } inputStream.close(); bufferedReader.close(); } catch (IOException e) { e.printStackTrace(); } return stringBuilder.toString(); } }