private String convertLineSeparators(String string){
  return string.replaceAll(System.lineSeparator()," ");
}

private String convertLineSeparators ( String string ) { return string . replaceAll ( System . lineSeparator ( ) , " " ) ; }
returns a string with line separators converted to spaces .
