Class HttpConnection


  • public class HttpConnection
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpConnection()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void disconnectHttpConnection​(java.net.HttpURLConnection conn)
      Used for releasing HttpURLConnection object/resource
      static java.net.HttpURLConnection getHttpURLConnection​(java.lang.String url)
      It will be use for retrieving HttpURLConnection
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpConnection

        public HttpConnection()
    • Method Detail

      • getHttpURLConnection

        public static java.net.HttpURLConnection getHttpURLConnection​(java.lang.String url)
                                                               throws java.lang.IllegalArgumentException,
                                                                      java.net.MalformedURLException,
                                                                      java.io.IOException
        It will be use for retrieving HttpURLConnection
        Parameters:
        url - String
        Returns:
        true/false if URL is valid/invalid
        Throws:
        java.lang.IllegalArgumentException - throws for wrong parameter
        java.net.MalformedURLException - if any URL is not formed correctly
        java.io.IOException - throws for any IO operation
      • disconnectHttpConnection

        public static void disconnectHttpConnection​(java.net.HttpURLConnection conn)
        Used for releasing HttpURLConnection object/resource
        Parameters:
        conn - HttpURLConnection