Here you can find the source of startsWithSlash(String url)
public static String startsWithSlash(String url)
//package com.java2s; //License from project: Open Source License public class Main { public static String startsWithSlash(String url) { return url.startsWith("/") ? url : "/" + url; }/* ww w .j a v a 2 s . c o m*/ }