public static String Indent(String str){
  curIndent[indentDepth + 1]=curIndent[indentDepth] + str.length();
  indentDepth=indentDepth + 1;
  return str;
}

public static String Indent ( String str ) { curIndent [ indentDepth + 1 ] = curIndent [ indentDepth ] + str . length ( ) ; indentDepth = indentDepth + 1 ; return str ; }
there must be an easier way .
