public static String readTextFromReader(final Reader reader) {
		StringBuffer sb = new StringBuffer();

		char[] buf = new char[1024 * 4];
		int readLen;
		try {
			while (-1 != (readLen = reader.read(buf))) {
				sb.append(buf, 0, readLen);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (null != reader) {
				try {
					reader.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		return sb.toString();
	}