indent = indent.substring(0,indent.length() - sPrettyXDFOutputIndentation.length());
indent = indent.substring(0,indent.length() - Specification.getInstance().getPrettyXDFOutputIndentation().length());
  private String dealWithClosingGroupNodes (BaseObject obj, OutputStream outputstream, String indent) {    // Should *both* groupMemberHash and openGroupNodeHash be synchronized??    synchronized(obj.groupMemberHash) {      synchronized(this.openGroupNodeHash) {        Iterator iter = this.openGroupNodeHash.iterator(); // Must be in synchronized block        while (iter.hasNext()) {          Group openGroup = (Group) iter.next();          // determine if this group that we belong to is already          // open or not.          if(!obj.groupMemberHash.contains(openGroup)) {            // its *not* a member of this group and its still open,            // so we need to close it.            if (sPrettyXDFOutput) writeOut(outputstream, indent);            writeOut(outputstream, "</" + openGroup.classXDFNodeName + ">");            if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE);            this.openGroupNodeHash.remove(openGroup);            // peel off some indent            indent = indent.substring(0,indent.length() - sPrettyXDFOutputIndentation.length());          }        }      }    }    return indent;  }