Here you can find the source of isValidFileName(String paramString)
public static boolean isValidFileName(String paramString)
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { public static boolean isValidFileName(String paramString) { boolean rtn = false; if (paramString != null) { File localFile = new File(paramString); try { if (localFile.getCanonicalPath() != null) { rtn = true;//from www .ja v a 2s .c o m } } catch (IOException ex) { } } return rtn; } public static String getCanonicalPath(File file) { String path = ""; try { path = file.getCanonicalPath(); } catch (Exception ex) { path = file.getAbsolutePath(); } return path; } }