Here you can find the source of splitBySeparator(String path, String separator)
private static List<String> splitBySeparator(String path, String separator)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { private static List<String> splitBySeparator(String path, String separator) { return Arrays.asList(path.split(separator.replace("\\", "\\\\"))); }// ww w . j a v a 2 s .c o m }