public static String columnEncode(String string){
  if (string != null) {
    string=string.replaceAll("<","_lt");
    string=string.replaceAll(">","_gt");
    string=string.replaceAll(ILLEGAL_FILENAME_CHARS_REGEX,EMPTY);
    string=string.length() > 255 ? string.substring(0,255) : string;
    string=string.toLowerCase();
  }
  return string;
}

public static String columnEncode ( String string ) { if ( string != null ) { string = string . replaceAll ( "<" , "_lt" ) ; string = string . replaceAll ( ">" , "_gt" ) ; string = string . replaceAll ( ILLEGAL_FILENAME_CHARS_REGEX , EMPTY ) ; string = string . length ( ) > 255 ? string . substring ( 0 , 255 ) : string ; string = string . toLowerCase ( ) ; } return string ; }
generates a string which is acceptable as a filename .
