public static Date dateFromHeaderString(String datstr){
  SimpleDateFormat fmt=new SimpleDateFormat(HTTP_FORMAT,Locale.US);
  ParsePosition zero=new ParsePosition(0);
  fmt.setTimeZone(GMT_ZONE);
  return (fmt.parse(datstr,zero));
}

public static Date dateFromHeaderString ( String datstr ) { SimpleDateFormat fmt = new SimpleDateFormat ( HTTP_FORMAT , Locale . US ) ; ParsePosition zero = new ParsePosition ( 0 ) ; fmt . setTimeZone ( GMT_ZONE ) ; return ( fmt . parse ( datstr , zero ) ) ; }
convert a date in iso 8601 format to the format needed for an http header .
