Here you can find the source of formatDateHeader(final Date date)
public static String formatDateHeader(final Date date)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Red Hat, Inc../*from ww w .j av a 2 s. c om*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String DATE_HEADER_FMT = "EEE, dd MMM yyyy HH:mm:ss zzz"; public static String formatDateHeader(final long date) { return new SimpleDateFormat(DATE_HEADER_FMT).format(new Date(date)); } public static String formatDateHeader(final Date date) { return new SimpleDateFormat(DATE_HEADER_FMT).format(date); } }