Downloading files using OkHttp, Okio and RxJava
I'm trying to download files using OkHttp and writing to disk with Okio. Also I've created an rx observable for this process. It is working, however it is noticeably slower than what I had previously used (Koush's Ion library). Here's how I create the observable: public Observable<FilesWrapper> download(List<Thing> things) { return Observable.from(things) .map(thing -> { File file = new File(getExternalCacheDir() + File.separator + thing.getName()); if (!file.exists()) { Request request = new Request.Builder().url(thing.getUrl()).build(); Response response; try { response = client.newCall