code: private DataSource createBatchCreateEntityPart(String verb,
              String entityName, EntryType entryType, URI uri, int contentId)
              throws JAXBException {
          ByteArrayOutputStream stream = new ByteArrayOutputStream();
          this.oDataAtomMarshaller.marshalEntryType(entryType, stream);
          byte[] bytes = stream.toByteArray();
  
          // adds header
          InternetHeaders headers = new InternetHeaders();
          headers.addHeader("Content-ID", Integer.toString(contentId));
          headers.addHeader("Content-Type", "application/atom+xml;type=entry");
          headers.addHeader("Content-Length", Integer.toString(bytes.length));
          headers.addHeader("DataServiceVersion", "3.0;NetFx");
          headers.addHeader("MaxDataServiceVersion", "3.0;NetFx");
  
          // adds body
          ByteArrayOutputStream httpRequest = new ByteArrayOutputStream();
          addHttpMethod(httpRequest, verb, uri);
          appendHeaders(httpRequest, headers);
          appendEntity(httpRequest, new ByteArrayInputStream(bytes));
  
          DataSource bodyPartContent = new InputStreamDataSource(
                  new ByteArrayInputStream(httpRequest.toByteArray()),
                  "application/http");
          return bodyPartContent;
      }
docs: Creates the batch create entity part.
  
  @param entityName
  the entity name
  @param entity
  the entity
  @param uri
  the uri
  @param contentId
  the content id
  @return the data source
  @throws JAXBException
  the jAXB exception