Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.io.IOException;

import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    private final static int ONE_MINUTE = 60;

    private static HttpURLConnection createHttpsURLConnection(String urlString) throws IOException {
        URL url = new URL(urlString);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setConnectTimeout(ONE_MINUTE);
        connection.setReadTimeout(ONE_MINUTE);

        return connection;
    }
}