code: public static String readText(InputStream inputStream) {
  		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
  		String line;
  		StringBuilder stringBuilder = new StringBuilder();
  		try {
  			while ((line = bufferedReader.readLine()) != null) {
  				stringBuilder.append(line);
  				stringBuilder.append('\n');
  			}
  		} catch (IOException e) {
  			Logger.error(e.getMessage());
  			e.printStackTrace();
  			return null;
  		} finally {
  			
  			if (bufferedReader != null) {
  				try {
  					bufferedReader.close();
  				} catch (IOException e) {
  					Logger.error(e.getMessage());
  					e.printStackTrace();
  				}
  			}
  			
  		}
  		return stringBuilder.toString();
  	}
docs: Read text.
  
  @param inputStream the input stream
  @return the string