|
|
|
@ -250,9 +250,11 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stri
|
|
|
|
|
private static final String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss Z"; // with numeric time zone indicator as defined in RFC5322
|
|
|
|
|
private static final String PATTERN_RFC1036 = "EEEE, dd-MMM-yy HH:mm:ss zzz";
|
|
|
|
|
private static final String PATTERN_ANSIC = "EEE MMM d HH:mm:ss yyyy";
|
|
|
|
|
private static final String PATTERN_GSAFS = "yyyy-MM-dd";
|
|
|
|
|
private static final SimpleDateFormat FORMAT_RFC1123 = new SimpleDateFormat(PATTERN_RFC1123, Locale.US);
|
|
|
|
|
private static final SimpleDateFormat FORMAT_RFC1036 = new SimpleDateFormat(PATTERN_RFC1036, Locale.US);
|
|
|
|
|
private static final SimpleDateFormat FORMAT_ANSIC = new SimpleDateFormat(PATTERN_ANSIC, Locale.US);
|
|
|
|
|
private static final SimpleDateFormat FORMAT_GSAFS = new SimpleDateFormat(PATTERN_GSAFS, Locale.US);
|
|
|
|
|
private static final TimeZone TZ_GMT = TimeZone.getTimeZone("GMT");
|
|
|
|
|
private static final Calendar CAL_GMT = Calendar.getInstance(TZ_GMT, Locale.US);
|
|
|
|
|
|
|
|
|
@ -287,6 +289,14 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stri
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static final String formatGSAFS(final Date date) {
|
|
|
|
|
if (date == null) return "";
|
|
|
|
|
synchronized (FORMAT_GSAFS) {
|
|
|
|
|
final String s = FORMAT_GSAFS.format(date);
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Initialization of static formats */
|
|
|
|
|
static {
|
|
|
|
|
// 2-digit dates are automatically parsed by SimpleDateFormat,
|
|
|
|
@ -611,12 +621,15 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stri
|
|
|
|
|
this.k = k;
|
|
|
|
|
this.v = v;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getKey() {
|
|
|
|
|
return this.k;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getValue() {
|
|
|
|
|
return this.v;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String setValue(final String v) {
|
|
|
|
|
final String r = this.v;
|
|
|
|
|
this.v = v;
|
|
|
|
|