package com.quantum.util.io; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; /** * @author BC */ public class InputStreamHelper { public static String readIntoString(InputStream inputStream) throws IOException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); for (int b = inputStream.read(); b >= 0; b = inputStream.read()) { outputStream.write((byte) b); } return new String(outputStream.toByteArray()); } }