Here you can find the source of isAbsolute(final String path)
private static boolean isAbsolute(final String path)
//package com.java2s; /******************************************************************************* * Copyright (c) 2015-2016 Oak Ridge National Laboratory. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ public class Main { private static boolean isAbsolute(final String path) { return path.startsWith("/") || isURL(path); }/* w w w. j a v a2 s .co m*/ private static boolean isURL(final String path) { return path.startsWith("http://") || path.startsWith("https://"); } }