List of utility methods to do URI to Local Name
String | getLocalDomainURI(String originalHost, String dirPath, String childUri) get Local Domain URI if (childUri.contains(dirPath)) return childUri; if (childUri.startsWith("/")) childUri = childUri.substring(1); try { URL url = new URL(childUri); String host = url.getHost(); if (originalHost.equals(host)) { ... |
String | getLocalName(String uri) get Local Name if (uri.contains("/")) { int lastSlashPosition = uri.lastIndexOf("/"); return uri.substring(lastSlashPosition + 1); } else { return new String(uri); |
String | getLocalName(URI uri) Return the local name of a URI. return getLocalName(uri.toString());
|
String | getLocalName(URI uri) get Local Name if (uri == null) return null; return getLocalName(uri.toASCIIString()); |
String | getLocalPart(String uri) Get the local part of the uri, if possible. try { URI u = new URI(uri); String lname = u.getFragment(); if (lname == null) { lname = u.getPath(); return lname; } catch (URISyntaxException e) { ... |
String | getName(URI uri) get Name if (uri.getPath().contains("/")) return uri.getPath().substring(uri.getPath().lastIndexOf('/') + 1); else return uri.getPath(); |
String | getName(URI uri) Returns the name of the file that is pointed to by this URI. if (uri != null) { String location = uri.getSchemeSpecificPart(); if (location != null) { String name = location; int index = location.lastIndexOf('/'); if (index != -1) { name = name.substring(index + 1, name.length()); return name; return ""; |
String | getName(URI uri) Returns the name of an URI for display in the title bar of a window. if (uri.getScheme() != null && uri.getScheme().equals("file")) { return new File(uri).getName(); return uri.toString(); |
String | getName(URI uri) Derives name from uri. if (uri == null) return null; if ("file".equals(uri.getScheme())) return new File(uri).getName(); return getURIName(uri); |
String | getName(URI uri) Get the name. if (uri == null) throw new IllegalArgumentException("Null uri"); String name = uri.getPath(); if (name != null) { int lastSlash = name.lastIndexOf('/'); if (lastSlash > 0) name = name.substring(lastSlash + 1); return name; |