code: private static String determineSeparator(String filename) {
  		int forwardCount = StringUtils.countMatches(filename, "/");
  		int backwardCount = StringUtils.countMatches(filename, "\\");
  
  		return forwardCount >= backwardCount ? "/" : "\\";
  	}
docs: Helper method to determine the file separator (forward or backward slash)
  used in a filename. The slash that occurs more often is returned as the
  separator.
  
  @param filename
  The filename parsed to determine the file separator.
  @return The file separator used within <code>filename</code>. This value
  is either a forward or backward slash.