Here you can find the source of isAbsolute(String uri)
public static boolean isAbsolute(String uri)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2007 IBM Corporation and others. * 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 * * Contributors:/* w w w .j ava 2 s.c om*/ * IBM Corporation - initial API and implementation * yyyymmdd bug Email and other contact information * -------- -------- ----------------------------------------------------------- * IBM Corporation - Initial API and implementation * Jens Lukowski/Innoopract - initial renaming/restructuring * 20071205 211262 ericdp@ca.ibm.com - Eric Peters, CopyWSDLTreeCommand fails to copy ?wsdl *******************************************************************************/ public class Main { protected static final String PROTOCOL_PATTERN = ":"; public static boolean isAbsolute(String uri) { boolean result = false; if (uri != null) { int index = uri.indexOf(PROTOCOL_PATTERN); if (index != -1 || uri.startsWith("/") || uri.startsWith("\\")) { result = true; } } return result; } }