protected String indent(String content,int count,String indentStr){
  String result;
  StringTokenizer tok;
  int i;
  tok=new StringTokenizer(content,"\n",true);
  result="";
  while (tok.hasMoreTokens()) {
    if (result.endsWith("\n") || (result.length() == 0)) {
      for (i=0; i < count; i++) {
        result+=indentStr;
      }
    }
    result+=tok.nextToken();
  }
  return result;
}

protected String indent ( String content , int count , String indentStr ) { String result ; StringTokenizer tok ; int i ; tok = new StringTokenizer ( content , "\n" , true ) ; result = "" ; while ( tok . hasMoreTokens ( ) ) { if ( result . endsWith ( "\n" ) || ( result . length ( ) == 0 ) ) { for ( i = 0 ; i < count ; i ++ ) { result += indentStr ; } } result += tok . nextToken ( ) ; } return result ; }
indents the given string by a given number of indention strings
