if (result != null)
return result;
HTTPMethod method = null;
try {
method = session.newMethodHead(location);
int statusCode = method.execute();
if (statusCode >= 300) {
if (statusCode == 401)
throw new IOException("Unauthorized to open dataset " + location);
else