private String convertToHtml(final String string){
  return "<pre><br/>" + string.replaceAll("\n","<br/>") + "<br/></pre>";
}

private String convertToHtml ( final String string ) { return "<pre><br/>" + string . replaceAll ( "\n" , "<br/>" ) + "<br/></pre>" ; }
converts text to html , by transforming \ n to < br / >
