private Headers headOrNull ( CPath path ) { try { String url = getObjectUrl ( path ) ; HttpHead request = new HttpHead ( url ) ; RequestInvoker < CResponse > ri = getBasicRequestInvoker ( request , path ) ; CResponse response = retryStrategy . invokeRetry ( ri ) ; return response . getHeaders ( ) ; } catch ( CFileNotFoundException ex ) { return null ; } }
Perform a quick HEAD request on the given object to check existence and type .