List of usage examples for org.apache.commons.httpclient.methods HeadMethod getName
public String getName()
From source file:org.osaf.caldav4j.CalDAVCollection.java
public int testConnection(HttpClient httpClient) throws CalDAV4JException { HeadMethod method = new HeadMethod(); method.setPath(getCalendarCollectionRoot()); try {//w w w . j a v a 2s .c o m httpClient.executeMethod(hostConfiguration, method); } catch (Exception e) { throw new CalDAV4JException(e.getMessage(), new Throwable(e.getCause())); } switch (method.getStatusCode()) { case CaldavStatus.SC_OK: break; default: throw new BadStatusException(method.getStatusCode(), method.getName(), getCalendarCollectionRoot()); } return method.getStatusCode(); }