code: public void write(OutputStream stream) throws IOException
     {
        this.outputStream = stream;
        try
        {
           this.xmlStreamWriter =
              XMLOutputFactory.newInstance().createXMLStreamWriter(outputStream, Constants.DEFAULT_ENCODING);
           xmlStreamWriter.setNamespaceContext(namespaceContext);
  
           xmlStreamWriter.writeStartDocument();
           xmlStreamWriter.writeStartElement("D", "multistatus", "DAV:");
           xmlStreamWriter.writeNamespace("D", "DAV:");
  
           xmlStreamWriter.writeAttribute("xmlns:b", "urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/");
  
           traverseResources(rootResource, 0);
  
           // D:multistatus
           xmlStreamWriter.writeEndElement();
           xmlStreamWriter.writeEndDocument();
  
           // rootNode.accept(this);
        }
        catch (XMLStreamException exc)
        {
           LOG.error(exc.getMessage(), exc);
           throw new IOException(exc.getMessage(), exc);
        }
        catch (RepositoryException exc)
        {
           LOG.error(exc.getMessage(), exc);
           throw new IOException(exc.getMessage(), exc);
        }
        catch (IllegalResourceTypeException exc)
        {
           LOG.error(exc.getMessage(), exc);
           throw new IOException(exc.getMessage(), exc);
        }
        catch (URISyntaxException exc)
        {
           LOG.error(exc.getMessage(), exc);
           throw new IOException(exc.getMessage(), exc);
        }
     }
docs: {@inheritDoc}