Back to project page visiting-card-android.
The source code is released under:
GNU General Public License
If you think the Android project visiting-card-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.matrix.visitingcard.util; /*w w w .ja v a 2s . c om*/ import java.io.IOException; import java.net.HttpURLConnection; import java.util.Map; import android.content.Context; import com.nostra13.universalimageloader.core.download.BaseImageDownloader; public class CustomImageDownaloder extends BaseImageDownloader { public CustomImageDownaloder(Context context) { super(context); } public CustomImageDownaloder(Context context, int connectTimeout, int readTimeout) { super(context, connectTimeout, readTimeout); } @Override protected HttpURLConnection createConnection(String url, Object extra) throws IOException { HttpURLConnection conn = super.createConnection(url, extra); Map<String, String> headers = (Map<String, String>) extra; if (headers != null) { for (Map.Entry<String, String> header : headers.entrySet()) { conn.setRequestProperty(header.getKey(), header.getValue()); } } return conn; } }