Here you can find the source of isAbsoluteURL(String str)
/ and without protocol nor host portion
License
Open Source License
Declaration
static public boolean isAbsoluteURL(String str)
Method Source Code
//package com.java2s;
/*******************************************************************************
* Copyright (c) 2005-2011 eBay Inc.//from w ww . j a va 2 s . co m
* 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 {
/**
* Check if the given url string is the absolute URL starting with
* <code>/<code> and without protocol nor host portion
*/
static public boolean isAbsoluteURL(String str) {
return (str.startsWith("/") && !str.startsWith("//"));
}
}
Related