package org.sagebionetworks.bridge.android.util.retrofit;

import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;

import retrofit2.Call;
import rx.Observable;
import rx.Single;
import rx.schedulers.Schedulers;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * Created by jyliu on 1/19/2017.
 */
@AnyThread
public class RxUtils {
    @NonNull
    public static <T> Single<T> toBodySingle(@NonNull Call<T> call) {
        checkNotNull(call);

        return Observable.create(new BodyOnSubscribe<>(new CallOnSubscribe<>(call)))
                .subscribeOn(Schedulers.io()).toSingle();
    }

}

@@ -380,16 +380,277 @@
 Utils %7B%0A
+    /**%0A     * Converts a Retrofit Call to a single, subscribes on an IO thread, so the network call is%0A     * performed on an IO thread.%0A     *%0A     * @param call call to get response of%0A     * @param %3CT%3E response type%0A     * @return a response single%0A     */%0A
     @Non
@@ -654,16 +654,16 @@
 NonNull%0A
-
     publ
@@ -900,13 +900,12 @@
 ();%0A
+
     %7D%0A
-%0A
 %7D%0A

Add javadoc to RxUtils class