List of usage examples for org.apache.commons.httpclient.util DateParser parseDate
public static Date parseDate(String paramString) throws DateParseException
From source file:org.apache.maven.proxy.config.HttpRepoConfiguration.java
private static long getLastModified(HttpMethod method) { Header lastModifiedHeader = method.getResponseHeader("Last-Modified"); if (lastModifiedHeader == null) { return -1; }//from w w w. j av a 2 s .c o m String lastModifiedString = lastModifiedHeader.getValue(); try { return DateParser.parseDate(lastModifiedString).getTime(); } catch (DateParseException e) { LOGGER.warn("Unable to parse Last-Modified header : " + lastModifiedString); return System.currentTimeMillis(); } }