1 package com.quantum.util.io;
3 import java.io.ByteArrayOutputStream;
4 import java.io.IOException;
5 import java.io.InputStream;
10 public class InputStreamHelper {
11 public static String readIntoString(InputStream inputStream) throws IOException {
12 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
13 for (int b = inputStream.read(); b >= 0; b = inputStream.read()) {
14 outputStream.write((byte) b);
16 return new String(outputStream.toByteArray());