Java URI to Relative URI resolveFileNameNoExt(URI uri)

Here you can find the source of resolveFileNameNoExt(URI uri)

Description

resolve File Name No Ext

License

Apache License

Declaration

public static String resolveFileNameNoExt(URI uri) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.URI;

public class Main {
    public static String resolveFileNameNoExt(URI uri) {
        String fileName = resolveFileName(uri);
        return fileName.substring(0, fileName.lastIndexOf('.'));
    }/*from w w  w . ja  v  a 2 s . co  m*/

    public static String resolveFileName(URI uri) {
        String url = uri.toString();
        return url.substring(url.lastIndexOf('/') + 1, url.length());

    }
}

Related

  1. resolve(URI base, URI child)
  2. resolve(URI baseURI, String reference)
  3. resolveAbsoluteURI(final URI relativeURI)
  4. resolveFile(final URI relativeURI)
  5. resolveFileName(URI uri)
  6. resolveFileUri(String fullPageURI, File rootPath)
  7. resolvePartUri(URI sourcePartUri, URI targetUri)
  8. resolvePath(URI root, String subPath)
  9. resolvePort(URI uri)