code: public static String inputStreamToString(InputStream in) throws Exception {
  		BufferedReader br = new BufferedReader(new InputStreamReader(in));
  		StringBuffer buffer = new StringBuffer();
  		String line;
  		while ((line = br.readLine()) != null) {
  			buffer.append(line);
  		}
  		return buffer.toString();
  	}
docs: read a String from an InputStream object.
  @param in InputStream
  @return String
  @throws Exception