code: public List<DetectedFace> detectWithStream(byte[] image, DetectWithStreamOptionalParameter detectWithStreamOptionalParameter) {
          return detectWithStreamWithServiceResponseAsync(image, detectWithStreamOptionalParameter).toBlocking().single().body();
      }
docs: Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.
  
  @param image An image stream.
  @param detectWithStreamOptionalParameter the object representing the optional parameters to be set before calling this API
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws APIErrorException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the List&lt;DetectedFace&gt; object if successful.