Here you can find the source of tokenizeBase(URI uri)
private static StringTokenizer tokenizeBase(URI uri)
//package com.java2s; import java.net.URI; import java.util.StringTokenizer; public class Main { private static StringTokenizer tokenizeBase(URI uri) { String scheme = uri.getSchemeSpecificPart(); int index = scheme.lastIndexOf("/"); if (index != -1) { scheme = scheme.substring(0, index + 1); }//from w w w . j a v a2 s . c o m return new StringTokenizer(scheme, "/"); } }