code: public static final String formatPath(String path) {
  		if (path == null) {
  			return "";
  		}
  		path = path.trim();
  		if (path.isEmpty()) {
  			return path;
  		}
  		if (!path.startsWith("/")) {
  			path = '/' + path;
  		}
  		while (path.endsWith("/")) {
  			path = path.substring(0, path.length() - 1);
  		}
  		return path;
  	}
docs: --- PATH FORMATTER ---