Here you can find the source of toFilename(String str)
public static String toFilename(String str)
//package com.java2s; public class Main { public static String toFilename(String str) { return str.replaceAll("\\s", "_").replaceAll(":", "_"); }/* w w w.j a va 2s . com*/ }