code: public void startDocument(OutputStream os) throws ODataRenderException {
          try {
              outputStream = os;
              xmlWriter = XML_OUTPUT_FACTORY.createXMLStreamWriter(os, UTF_8.name());
              metadataWriter = new AtomMetadataWriter(xmlWriter, oDataUri, entityDataModel, nsConfigurationProvider);
              dataWriter = new AtomDataWriter(xmlWriter, entityDataModel, nsConfigurationProvider);
              xmlWriter.writeStartDocument(UTF_8.name(), XML_VERSION);
              xmlWriter.setPrefix(METADATA, nsConfigurationProvider.getOdataMetadataNs());
              xmlWriter.setPrefix(ODATA_DATA, nsConfigurationProvider.getOdataDataNs());
          } catch (XMLStreamException e) {
              LOG.error("Not possible to start stream XML");
              throw new ODataRenderException("Not possible to start stream XML: ", e);
          }
      }
docs: Start the XML stream document by defining things like the type of encoding, and prefixes used. It needs to be
  used before calling any write method.
  
  @param os {@link OutputStream} to write to.
  @throws ODataRenderException if unable to render the feed