httpservices/src/main/java/ucar/httpservices/HTTPUtil.java
static public String relpath(String path)
    {
        if(path == null) return null;
        StringBuilder b = new StringBuilder(path);
        canonicalpath(b);
        if(b.length() > 0) {
            if(b.charAt(0) == '/')
                b.deleteCharAt(0);
            if(hasDriveLetter(b))
                b.delete(0, 2);
        }
        return b.toString();
    }
static public String relpath(String path)
    {
        if(path == null) return null;
        StringBuilder b = new StringBuilder(path);
        canonicalpath(b);
        if(b.length() > 0) {
            if(b.charAt(0) == '/')
                b.deleteCharAt(0);
            if(hasDriveLetter(b))
                b.delete(0, 2);
        }
        return b.toString();
    }
Convert path to remove any leading '/' or drive letter assumes canonical.

@param path convert this path
@return relatived version