code: public void endDocument() throws ODataRenderException {
  
          try {
              xmlWriter.writeEndDocument();
              xmlWriter.flush();
          } catch (XMLStreamException e) {
              LOG.error("Not possible to end stream XML");
              throw new ODataRenderException("Not possible to end stream XML: ", e);
          }
      }
docs: End the XML stream document.
  
  @throws ODataRenderException if unable to render