public String convertStr(String string){
if(string==null){
           str1="";
}else
            {
                       try{
                                         string=string.replaceAll("<","&It;");
                                          string=string.replaceAll(">",“&gt”);
                                           string=string.replaceAll("","&nbsp;");
                                          string=string.replaceAll("\r\n","<br>");
                                    }catch(Exception e){
                                e.printStackTrace(System.err);
                         }
                  }
return string;
}