Here you can find the source of dateToHttpDateString(Date d)
public static String dateToHttpDateString(Date d)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; public class Main { public static String dateToHttpDateString(Date d) { DateFormat f = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); f.setTimeZone(TimeZone.getTimeZone("GMT")); return f.format(d); }/* w ww . j a v a2s . c om*/ }