/**
  * Creates FileResult object from the response of the file request.
  *
  * @param array $headers The HTTP response headers in array representation.
  *
  * @return FileResult
  */
 public static function create($headers)
 {
     $result = new FileResult();
     $result->setETag(Utilities::tryGetValueInsensitive(Resources::ETAG, $headers));
     if (Utilities::arrayKeyExistsInsensitive(Resources::LAST_MODIFIED, $headers)) {
         $lastModified = Utilities::tryGetValueInsensitive(Resources::LAST_MODIFIED, $headers);
         $result->setLastModified(Utilities::rfc1123ToDateTime($lastModified));
     }
     return $result;
 }