Here you can find the source of tokenizePath(String path)
public static String[] tokenizePath(String path)
//package com.java2s; import java.util.*; public class Main { public static String[] tokenizePath(String path) { ArrayList alist = new ArrayList(); StringTokenizer tokenizer = new StringTokenizer(path, "."); while (tokenizer.hasMoreTokens()) { alist.add(tokenizer.nextToken()); }/*w w w .jav a2 s . co m*/ return (String[]) alist.toArray(new String[alist.size()]); } }