Back to project page Helpers.
The source code is released under:
MIT License
If you think the Android project Helpers 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 at.wrdlbrnft.helpers; /*from w w w .j a va2s .com*/ import java.io.InputStream; import java.util.Scanner; /** * Created with IntelliJ Idea 13 * User: Xaver * Date: 20/05/14 */ public class StreamHelper { public static String read(InputStream stream) { Scanner scanner = new Scanner(stream).useDelimiter("\\A"); return scanner.hasNext() ? scanner.next() : ""; } }