public static long lastModifiedAsLong ( String strTime ) throws IOException { final SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( TIME_PATTERN , Locale . US ) ; try { long lastModified = simpleDateFormat . parse ( strTime ) . getTime ( ) ; if ( lastModified == 0 ) { lastModified = System . currentTimeMillis ( ) ; } return lastModified ; } catch ( ParseException e ) { throw new IOException ( "Failed to parse " + strTime , e ) ; } }
Transforms last modified time stamp from String to the long format