Here you can find the source of getHeaderFormat()
private static DateFormat getHeaderFormat()
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; public class Main { private static final String HEADER_FORMAT = "EEE, d MMM yyyy HH:mm:ss z"; private static final ThreadLocal<DateFormat> headerFormat = new ThreadLocal<DateFormat>(); private static DateFormat getHeaderFormat() { DateFormat format = headerFormat.get(); if (format == null) { format = new SimpleDateFormat(HEADER_FORMAT, Locale.ENGLISH); format.setTimeZone(TimeZone.getTimeZone("UTC")); headerFormat.set(format);// w ww .j a va2 s .c o m } return format; } }