1 package com.airbnb.lottie.network; 2 3 import androidx.annotation.NonNull; 4 import androidx.annotation.WorkerThread; 5 6 import java.io.IOException; 7 8 /** 9 * Implement this interface to handle network fetching manually when animations are requested via url. By default, Lottie will use an 10 * {@link java.net.HttpURLConnection} under the hood but this enables you to hook into your own network stack. By default, Lottie will also handle 11 * caching the 12 * animations but if you want to provide your own cache directory, you may implement {@link LottieNetworkCacheProvider}. 13 * 14 * @see com.airbnb.lottie.Lottie#initialize 15 */ 16 public interface LottieNetworkFetcher { 17 @WorkerThread 18 @NonNull fetchSync(@onNull String url)19 LottieFetchResult fetchSync(@NonNull String url) throws IOException; 20 } 21