Here you can find the source of isFile(final URI uri)
Parameter | Description |
---|---|
uri | the URI to process |
public static boolean isFile(final URI uri)
//package com.java2s; /*//from www . j a v a 2 s .co m * Copyright (c) 2014 Stephan D. Cote' - All rights reserved. * * This program and the accompanying materials are made available under the * terms of the MIT License which accompanies this distribution, and is * available at http://creativecommons.org/licenses/MIT/ * * Contributors: * Stephan D. Cote * - Initial concept and implementation */ import java.net.URI; public class Main { /** * Is the URI representing a file?? * * @param uri the URI to process * * @return true if the URI is representing a file, false otherwise */ public static boolean isFile(final URI uri) { if ((uri != null) && (uri.getScheme() != null)) { return uri.getScheme().equalsIgnoreCase("file"); } return false; } }