public static String wrapInTag(String line,String tag,String cssClass){
  StringBuilder tagBuilder=new StringBuilder();
  tagBuilder.append("<");
  tagBuilder.append(tag);
  if (cssClass != null) {
    tagBuilder.append(" class=\"");
    tagBuilder.append(cssClass);
    tagBuilder.append("\"");
  }
  tagBuilder.append(">");
  String startTag=tagBuilder.toString();
  tagBuilder.delete(0,tagBuilder.length());
  tagBuilder.append("</");
  tagBuilder.append(tag);
  tagBuilder.append(">");
  String endTag=tagBuilder.toString();
  return startTag + line + endTag;
}

public static String wrapInTag ( String line , String tag , String cssClass ) { StringBuilder tagBuilder = new StringBuilder ( ) ; tagBuilder . append ( "<" ) ; tagBuilder . append ( tag ) ; if ( cssClass != null ) { tagBuilder . append ( " class=\"" ) ; tagBuilder . append ( cssClass ) ; tagBuilder . append ( "\"" ) ; } tagBuilder . append ( ">" ) ; String startTag = tagBuilder . toString ( ) ; tagBuilder . delete ( 0 , tagBuilder . length ( ) ) ; tagBuilder . append ( "</" ) ; tagBuilder . append ( tag ) ; tagBuilder . append ( ">" ) ; String endTag = tagBuilder . toString ( ) ; return startTag + line + endTag ; }
wrap the given line with the given tag
