In a single-threaded application when you call a method it returns only when the computations are done
(IOUtils.toString()
comes from Apache Commons IO:
public String downloadContents(URL url) throws IOException { try(InputStream input = url.openStream()) {