code: protected RequestEntity createBinaryRequestContent(HTTPRequest httpRequest)
      {
          RequestEntity requestEntity=null;
          byte[] contentBinary=httpRequest.getContentAsBinary();
          if(contentBinary!=null)
          {
              requestEntity=new ByteArrayRequestEntity(contentBinary,"binary/octet-stream");
          }
          
          return requestEntity;
      }
docs: This function creates a binary type request entity and populates it
  with the data from the provided HTTP request.
  
  @param   httpRequest
  The HTTP request
  @return  The request entity