OutputFormat of = new OutputFormat (doc); of.setPreserveSpace (indentXMLSentToVishnu); of.setIndenting     (indentXMLSentToVishnu);
OutputFormat of = new OutputFormat (doc, "UTF-8", true); of.setLineWidth (150);
  protected void writeDocToStream (Document doc, OutputStream os) {    OutputFormat of = new OutputFormat (doc);	of.setPreserveSpace (indentXMLSentToVishnu);	of.setIndenting     (indentXMLSentToVishnu);		XMLSerializer serializer = new XMLSerializer (os, of);    try {      serializer.serialize (doc);    } catch (IOException ioe) {System.out.println ("Exception " + ioe);}  }