static String removeControlChars(String value){
  StringBuilder buffer=new StringBuilder(value);
  for (int i=0; i < buffer.length(); i++) {
    if (isControlChar(buffer.charAt(i))) {
      buffer.setCharAt(i,' ');
    }
  }
  return buffer.toString();
}

static String removeControlChars ( String value ) { StringBuilder buffer = new StringBuilder ( value ) ; for ( int i = 0 ; i < buffer . length ( ) ; i ++ ) { if ( isControlChar ( buffer . charAt ( i ) ) ) { buffer . setCharAt ( i , ' ' ) ; } } return buffer . toString ( ) ; }
replaces the ascii control chars with a space .
