Fixed: 1776098 - Cannot open source file from Breakpoints View
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / util / io / InputStreamHelper.java
1 package com.quantum.util.io;
2
3 import java.io.ByteArrayOutputStream;
4 import java.io.IOException;
5 import java.io.InputStream;
6
7 /**
8  * @author BC
9  */
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);
15         }
16         return new String(outputStream.toByteArray());
17     }
18 }