Java URL Connection pingUrl(URL url)

Here you can find the source of pingUrl(URL url)

Description

ping Url

License

Apache License

Declaration

public static void pingUrl(URL url) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;
import java.net.URL;
import java.net.URLConnection;

public class Main {
    public static void pingUrl(URL url) throws IOException {
        URLConnection con = url.openConnection();
        con.connect();/*w ww  .j  a  v a 2  s  . c  o  m*/
        con.getInputStream().read();
    }
}

Related

  1. loadJar(String path, URL resource)
  2. loadLinesUrl(String url)
  3. loadObjectFromURL(URL url)
  4. map2URL(final Properties properties)
  5. parseURL(ClassLoader classLoader, String uri)
  6. queryComputeAPI(String url)
  7. renderRequest(URLConnection connection)
  8. resolveModuleEntriesFromJar(URL url, String _prefix)
  9. retrieveData(URL url)