class PathUtil {

  public static String toBucketKey(URI uri) {
    String key = uri.getPath().substring(1);
    if (key.isEmpty()) {
      throw new IllegalArgumentException("URI " + uri + " has no path part");
    }
    return key;
  }

  private  PathUtil();

}