code: @Nonnull
  	public static String readInputStreamToString(@Nonnull final InputStream inputStream, @Nonnull final Charset charset)
  			throws IOException {
  		final BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
  		final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
  		int result = bufferedInputStream.read();
  		while (result != -1) {
  			byteArrayOutputStream.write((byte) result);
  			result = bufferedInputStream.read();
  		}
  		return byteArrayOutputStream.toString(checkNonEmptyArgument(charset, "charset").name());
  	}
docs: Uses standard JDK java to read an inputstream to String using the given encoding (in {@link ByteArrayOutputStream#toString(String)}).