code: public void write(OutputStream outStream) throws IOException
     {
        try
        {
           XMLStreamWriter xmlStreamWriter =
              XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, Constants.DEFAULT_ENCODING);
  
           xmlStreamWriter.setNamespaceContext(nsContext);
  
           xmlStreamWriter.writeStartDocument();
           xmlStreamWriter.writeStartElement("D", "multistatus", "DAV:");
           xmlStreamWriter.writeNamespace("D", "DAV:");
  
           xmlStreamWriter.writeAttribute("xmlns:b", "urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/");
  
           xmlStreamWriter.writeStartElement("DAV:", "response");
           xmlStreamWriter.writeStartElement("DAV:", "href");
           xmlStreamWriter.writeCharacters(uri.toASCIIString());
           xmlStreamWriter.writeEndElement();
  
           Map<String, Set<HierarchicalProperty>> propStats = getPropStat();
           PropertyWriteUtil.writePropStats(xmlStreamWriter, propStats);
  
           xmlStreamWriter.writeEndElement();
  
           // D:multistatus
           xmlStreamWriter.writeEndElement();
           xmlStreamWriter.writeEndDocument();
  
        }
        catch (XMLStreamException exc)
        {
           throw new IOException(exc.getMessage(), exc);
        }
     }
docs: {@inheritDoc}