MkcolMethod mkcol = new MkcolMethod(newColl.getURI());
mkcol.setFollowRedirects(true);
generateIfHeader(mkcol, lockToken);
int status = client.executeMethod(mkcol);
if (status != WebdavStatus.SC_CREATED) {
HttpException ex = new HttpException("Can't create collection " +
newColl);
ex.setReasonCode(status);
ex.setReason(mkcol.getStatusText());
throw ex;
}
}
return created;
}