Here you can find the source of isLocal(final URI uri)
Parameter | Description |
---|---|
uri | The address of the file to test. |
public static boolean isLocal(final URI uri)
//package com.java2s; /*/*from ww w . ja v a 2 s . co m*/ * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2013, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library 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 * Lesser General Public License for more details. */ import java.net.URI; public class Main { /** * Check if the data pointed by given URL is inside or outside current fileSystem. * @param uri The address of the file to test. * @return true if the URL describe a local file, false otherwise. */ public static boolean isLocal(final URI uri) { return "file".equalsIgnoreCase(uri.getScheme()); } }