Java URL Connection renderRequest(URLConnection connection)

Here you can find the source of renderRequest(URLConnection connection)

Description

Render request according setting

License

Apache License

Parameter

Parameter Description
connection a parameter

Declaration

private static void renderRequest(URLConnection connection) 

Method Source Code

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

import java.net.*;

public class Main {
    private static Integer connectTimeout = null;
    private static Integer socketTimeout = null;

    /**/*from   ww w  . j a va 2 s .c  o  m*/
     * Render request according setting
     *
     * @param connection
     */
    private static void renderRequest(URLConnection connection) {

        if (connectTimeout != null) {
            connection.setConnectTimeout(connectTimeout);
        }

        if (socketTimeout != null) {
            connection.setReadTimeout(socketTimeout);
        }

    }
}

Related

  1. loadObjectFromURL(URL url)
  2. map2URL(final Properties properties)
  3. parseURL(ClassLoader classLoader, String uri)
  4. pingUrl(URL url)
  5. queryComputeAPI(String url)
  6. resolveModuleEntriesFromJar(URL url, String _prefix)
  7. retrieveData(URL url)
  8. retrieveFromUrl(String url, boolean useCache, boolean deleteOnExit)
  9. retrieveHtml(URLConnection http)