public static String removeIllegalCharacter(final String text){
  final StringBuilder rVal=new StringBuilder();
  for (int i=0; i < text.length(); ++i) {
    if (!isIllegalFileNameChar(text.charAt(i))) {
      rVal.append(text.charAt(i));
    }
  }
  return rVal.toString();
}

public static String removeIllegalCharacter ( final String text ) { final StringBuilder rVal = new StringBuilder ( ) ; for ( int i = 0 ; i < text . length ( ) ; ++ i ) { if ( ! isIllegalFileNameChar ( text . charAt ( i ) ) ) { rVal . append ( text . charAt ( i ) ) ; } } return rVal . toString ( ) ; }
designed to remove / \ b \ n \ r \ t \ 0 \ f ` ? * \ < > | " ' : . , ^ [ ] = + ;
