//package cn.i2edu.dubbing_lib.api
//
//import okhttp3.OkHttpClient
//import retrofit2.Retrofit
//import java.util.concurrent.TimeUnit
//
//class DownloadHelper {
//    companion object {
//        val Tag: String = "DownloadHelper"
//        // kotlin DLC mode
//        val instance: DownloadHelper by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
//            DownloadHelper()
//        }
//    }
//
//    private lateinit var mRetrofit: Retrofit
//    private lateinit var mHttpClient: OkHttpClient
//
//    constructor(): this(30, 30, 30)
//
//    constructor(connectTimeOut: Long, readTimeOut: Long, writeTimeOut: Long) {
//        val builder = OkHttpClient.Builder()
//                .connectTimeout(connectTimeOut, TimeUnit.SECONDS)
//                .readTimeout(readTimeOut, TimeUnit.SECONDS)
//                .writeTimeout(writeTimeOut, TimeUnit.SECONDS);
//        mHttpClient = builder.build()
//    }
//
//    fun buildRetrofit(baseUrl: String): DownloadHelper {
//        mRetrofit = Retrofit.Builder()
//                .baseUrl(baseUrl)
//                .client(mHttpClient)
//                .build()
//        return this
//    }
//
//    public fun <T> createRetrofit(serviceClass: Class<T>): T {
//        return mRetrofit.create(serviceClass)
//    }
//
//}