Here you can find the source of isAbsolutePath(String path)
public static boolean isAbsolutePath(String path)
//package com.java2s; /* SpagoBI, the Open Source Business Intelligence suite /*from w w w. j av a2 s.c o m*/ * Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0, without the "Incompatible With Secondary Licenses" notice. * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ public class Main { public static boolean isAbsolutePath(String path) { if (path == null) return false; return (path.startsWith("/") || path.startsWith("\\") || path.charAt(1) == ':'); } }