Here you can find the source of isAbsoluteURL(String url)
Parameter | Description |
---|---|
url | String the url string to test |
public static boolean isAbsoluteURL(String url)
//package com.java2s; /*// ww w.j av a2 s .c o m This file is part of JOrigin Common Library. JOrigin Common is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. JOrigin Common is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JOrigin Common. If not, see <http://www.gnu.org/licenses/>. */ public class Main { /** * Return true if the URL given in parameter is absolute * @param url String the url string to test * @return boolean true if the url is absolute, false otherwise */ public static boolean isAbsoluteURL(String url) { if (url.startsWith("file:/") || (url.startsWith("http:/"))) { return true; } return false; } }