private static char whitespaceToSpace(char c){
  return Character.isWhitespace(c) ? ' ' : c;
}

private static char whitespaceToSpace ( char c ) { return Character . isWhitespace ( c ) ? ' ' : c ; }
turns every whitespace character into a space character .
