Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.net.HttpURLConnection;

public class Main {
    private final static int CONNECT_TIMEOUT_MSEC = 15 * 1000;
    private final static int READ_TIMEOUT_MSEC = 30 * 1000;

    public final static HttpURLConnection setTimeout(HttpURLConnection con) {
        con.setConnectTimeout(CONNECT_TIMEOUT_MSEC);
        con.setReadTimeout(READ_TIMEOUT_MSEC);
        return con;
    }
}