Завантажити сайт

public static void main(String[] args) {

URL url;

InputStream is = null;

BufferedReader br;

String line="";

try {

url = new URL("https://notepad-plus-plus.org/download/v7.5.4.html");

is = url.openStream(); // throws an IOException

br = new BufferedReader(new InputStreamReader(is));

while ((line = br.readLine()) != null)

{

System.out.println(line);

}

}

catch (MalformedURLException mue)

{

mue.printStackTrace();

}

catch (IOException ioe)

{

ioe.printStackTrace();

}

finally

{

try

{

if (is != null) is.close();

}

catch (IOException ioe)

{

}

}

}