List of utility methods to do Parse HTTP Date
java.util.Date | parseHttpDate(String _dateStr) parse Http Date if (_dateStr == null) return null; int c1 = _dateStr.lastIndexOf(" "); if (c1 != -1) _dateStr = _dateStr.substring(0, c1).trim(); return parseDate(_dateStr, "EEE, d MMM yyyy HH:mm:ss"); |
Date | parseHttpDate(String dstr) Parse the http date string. synchronized (http_parse_lock) { if (parse_1123 == null) setupParsers(); try { return parse_1123.parse(dstr); } catch (java.text.ParseException pe) { try { return parse_850.parse(dstr); } catch (java.text.ParseException pe) { try { return parse_asctime.parse(dstr); } catch (java.text.ParseException pe) { throw new IllegalArgumentException(pe.toString()); |
Date | parseHttpDate(String ifModifiedSince) parse Http Date if (ifModifiedSince == null) { return null; try { return createDateFormat(DATE_FORMAT_RFC1123).parse(ifModifiedSince); } catch (ParseException e) { try { ... |
long | parseHttpDate(String s) parse Http Date return getSDF().parse(s).getTime();
|
Date | parseHttpDate(String string) Parse a String into a Date according to the HTTP/1.1 RFC ( if (string == null) return null; SimpleDateFormat formatter = new SimpleDateFormat(FORMAT_822, LOCALE); formatter.setTimeZone(TIMEZONE); try { return formatter.parse(string); } catch (ParseException exception) { return null; ... |
Date | parseHttpDate(String stringValue) Parse HTTP date. SimpleDateFormat formatRfc1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); try { return formatRfc1123.parse(stringValue); } catch (ParseException e) { SimpleDateFormat formatRfc1036 = new SimpleDateFormat("EEE, dd-MMM-yy HH:mm:ss zzz"); try { return formatRfc1036.parse(stringValue); } catch (ParseException e1) { ... |
Date | parseHttpDate(String value) parse Http Date try { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.US); Date expires = simpleDateFormat.parse(value); return expires; } catch (Exception e) { return tryParseDate(value); |
Date | parseHttpDateFormat(String httpDateFormat) Can be used to parse http times. return parseHttpDateFormatToDateTime(httpDateFormat);
|
Date | parseHttpDateString(String s) parse Http Date String return new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US).parse(s); |