Here you can find the source of getURIName(URI uri)
public static String getURIName(URI uri)
//package com.java2s; /******************************************************************************* * Copyright (c) 2009-2013 CWI//from w w w .j av a 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 * * Contributors: * * Davy Landman - Davy.Landman@cwi.nl *******************************************************************************/ import java.io.File; import java.net.URI; public class Main { public static String getURIName(URI uri) { File file = new File(uri.getPath()); return file.getName(); } }