code: public Observable<ServiceResponse<List<DetectedFace>>> detectWithStreamWithServiceResponseAsync(byte[] image, Boolean returnFaceId, Boolean returnFaceLandmarks, List<FaceAttributeType> returnFaceAttributes) {
          if (this.client.azureRegion() == null) {
              throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
          }
          if (image == null) {
              throw new IllegalArgumentException("Parameter image is required and cannot be null.");
          }
          Validator.validate(returnFaceAttributes);
          String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
          String returnFaceAttributesConverted = this.client.serializerAdapter().serializeList(returnFaceAttributes, CollectionFormat.CSV);
          RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
          return service.detectWithStream(returnFaceId, returnFaceLandmarks, returnFaceAttributesConverted, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<DetectedFace>>>>() {
                  @Override
                  public Observable<ServiceResponse<List<DetectedFace>>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<List<DetectedFace>> clientResponse = detectWithStreamDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.
  
  @param image An image stream.
  @param returnFaceId A value indicating whether the operation should return faceIds of detected faces.
  @param returnFaceLandmarks A value indicating whether the operation should return landmarks of the detected faces.
  @param returnFaceAttributes Analyze and return the one or more specified face attributes in the comma-separated string like "returnFaceAttributes=age,gender". Supported face attributes include age, gender, headPose, smile, facialHair, glasses and emotion. Note that each face attribute analysis has additional computational and time cost.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the List&lt;DetectedFace&gt; object