}
return null;
}
public URI createUser(String username, String password, Credentials credentials) throws UserExistsException, IOException {
Value userExists = getResource(new URIValue(users+username), credentials);
if ( userExists == NullValue.NULL || userExists != null ) {
throw new UserExistsException(new ErrorMessage("userExists", new String[] { username }));
} else {
URI userUri = new URIValue(users+username);
MkcolMethod mkcolMethod = new MkcolMethod(domain+userUri.toString());
mkcolMethod.setDoAuthentication(true);
HttpState httpState = new HttpState();
httpState.setCredentials(null, host, credentials);
int state = mkcolMethod.execute(httpState, new HttpConnection(host, port, protocol));
if ( state == HttpStatus.SC_CREATED ) {