Here you can find the source of toFileName(String address)
static public String toFileName(String address)
//package com.java2s; public class Main { static public String toFileName(String address) { StringBuilder builder = new StringBuilder(); int i = 0; while (i < address.length()) { char c = address.charAt(i); if (Character.isLetterOrDigit(c)) { builder.append(c);//w w w.jav a 2 s. c o m } else { builder.append('_'); } i++; } builder.append(".html"); return builder.toString(); } }