There is no one-method equivalent. You can do it with a few methods though:
To increase performance you can use a BufferedInputStream or BufferedReader in line 2 of the above code, and possibly create the StringWriter with the content-length of the URL's URLConnection. You would need to change lines 2-3 into this:
You would need to check if length is not -1 though, or creating the StringWriter would fail.