public void unlockFile(URI uri, String lockToken) throws IOException {
    if (lockToken == null || lockToken.isEmpty()) {
      return;
    }
    String url = decodeURI(uri);
    UnLockMethod unlockMethod = new UnLockMethod(url, lockToken);
    client.executeMethod(unlockMethod);
    if (unlockMethod.getStatusCode() != 200 && unlockMethod.getStatusCode() != 204) {
      logger.log(Level.INFO, "{0} {1}", new Object[]{MessageUtil.
        getMessage("error.webdav.unlocking"),
        unlockMethod.getStatusCode()});
    }
    try {
      unlockMethod.checkSuccess();
      logger.log(Level.INFO, MessageUtil.getMessage("info.webdav.unlocked"));
    } catch (DavException ex) {
      logger.log(Level.SEVERE,
          MessageUtil.getMessage("error.webdav.unlocking"), ex);
      throw new IOException(MessageUtil.getMessage("error.webdav.unlocking"), ex);
    }
  }