protected PathAttributes toAttributes(final StorageObject object) { final PathAttributes attributes = new PathAttributes(); if(StringUtils.isNotBlank(object.getMd5sum())) { // For manifest files, the ETag in the response for a GET or HEAD on the manifest file is the MD5 sum of // the concatenated string of ETags for each of the segments in the manifest. attributes.setChecksum(Checksum.parse(object.getMd5sum())); } attributes.setSize(object.getSize()); final String lastModified = object.getLastModified(); if(lastModified != null) { try { attributes.setModificationDate(iso8601DateParser.parse(lastModified).getTime()); } catch(InvalidDateException e) { log.warn(String.format("%s is not ISO 8601 format %s", lastModified, e.getMessage())); try { attributes.setModificationDate(rfc1123DateFormatter.parse(lastModified).getTime()); } catch(InvalidDateException f) { log.warn(String.format("%s is not RFC 1123 format %s", lastModified, f.getMessage())); } } } return attributes; }
case "LastConnect": try { current.setTimestamp(new ISO8601DateParser().parse(elementText));
segment.attributes().setSize(s.getSize()); try { segment.attributes().setModificationDate(dateParser.parse(s.getLastModified()).getTime());