Here you can find the source of addProperty(URLConnection connection)
public static void addProperty(URLConnection connection)
//package com.java2s; //License from project: Open Source License import java.net.URLConnection; public class Main { public static void addProperty(URLConnection connection) { connection.addRequestProperty("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-silverlight, */*"); connection.setRequestProperty("Referer", "https://9.186.10.56:8443/index.jsp"); connection.setRequestProperty("Accept-Language", "zh-cn"); connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); connection.setRequestProperty("Accept-Encoding", "gzip, deflate"); connection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Foxy/1; .NET CLR 2.0.50727;MEGAUPLOAD 1.0)"); connection.setRequestProperty("Connection", "Keep-Alive"); connection.setRequestProperty("Cache-Control", "no-cache"); }//w w w .j a va2 s. com }