import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;

public class DownloadPage {

    public static String DownloadPlainData(String inputUrl) throws IOException {
        StringBuilder pageData = new StringBuilder();
        URL url = new URL(inputUrl);
        URLConnection con = url.openConnection();

        try (InputStream is = con.getInputStream();
             BufferedReader br = new BufferedReader(new InputStreamReader(is))) {
            String line;
            while ((line = br.readLine()) != null) {
                pageData.append(line).append("\n");
            }
        }

        return pageData.toString();
    }
}