Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import java.io.InputStream;
- public class IOUtils {
- public static String readInputStream(InputStream is) throws IOException {
- StringBuffer stream = new StringBuffer();
- byte[] b = new byte[4096];
- for (int n; (n = is.read(b)) != -1;) {
- stream.append(new String(b, 0, n));
- }
- return stream.toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement