public void deflate(View view,OutputStream out) throws IOException {
  Document doc=deflateToDocument(view);
  try {
    DOMSource source=new DOMSource(doc);
    TransformerFactory transformerFactory=TransformerFactory.newInstance();
    Transformer transformer=transformerFactory.newTransformer();
    StreamResult result=new StreamResult(out);
    transformer.setOutputProperty(OutputKeys.INDENT,"yes");
    transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount","2");
    transformer.transform(source,result);
  }
 catch (  TransformerException e) {
    throw new RuntimeException(e);
  }
}

public void deflate ( View view , OutputStream out ) throws IOException { Document doc = deflateToDocument ( view ) ; try { DOMSource source = new DOMSource ( doc ) ; TransformerFactory transformerFactory = TransformerFactory . newInstance ( ) ; Transformer transformer = transformerFactory . newTransformer ( ) ; StreamResult result = new StreamResult ( out ) ; transformer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; transformer . setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "2" ) ; transformer . transform ( source , result ) ; } catch ( TransformerException e ) { throw new RuntimeException ( e ) ; } }
creates an xml dump for the view into given outputstream this is meant for debugging purposes only , and we don ' t guarantee that it ' s format will remain the same .
