public static String readInputStream(InputStream is) {
		StringBuffer sb = new StringBuffer();
		byte[] buf = new byte[1024];

		long start = System.currentTimeMillis();

		try {
			while (true) {
				int r = is.read(buf, 0, buf.length);
				if (r == -1)
					break;
				sb.append(new String(buf, 0, r, "ISO-8859-1"));
			}
		} catch (IOException e) {
			throw new Error("cannot read input stream", e);
		}

		return sb.toString();
	}