Package com.airbnb.lottie.network
Class DefaultLottieFetchResult
- java.lang.Object
-
- com.airbnb.lottie.network.DefaultLottieFetchResult
-
- All Implemented Interfaces:
LottieFetchResult,Closeable,AutoCloseable
public class DefaultLottieFetchResult extends Object implements LottieFetchResult
-
-
Constructor Summary
Constructors Constructor Description DefaultLottieFetchResult(HttpURLConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreambodyByteStream()voidclose()StringcontentType()Stringerror()booleanisSuccessful()
-
-
-
Constructor Detail
-
DefaultLottieFetchResult
public DefaultLottieFetchResult(@NonNull HttpURLConnection connection)
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessfulin interfaceLottieFetchResult- Returns:
- Is the operation successful
-
bodyByteStream
@NonNull public InputStream bodyByteStream() throws IOException
- Specified by:
bodyByteStreamin interfaceLottieFetchResult- Returns:
- Received content stream
- Throws:
IOException
-
contentType
@Nullable public String contentType()
- Specified by:
contentTypein interfaceLottieFetchResult- Returns:
- Type of content received
-
error
@Nullable public String error()
- Specified by:
errorin interfaceLottieFetchResult- Returns:
- Operation error
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-