Sequenceablepublic class DownloadConfig extends Object implements Sequenceable
This class provides parameters for download session configuration,
such as URIs, network types, storage paths, and DownloadConfig.
Use DownloadConfig.Builder#Builder(Context, Uri) to create a Builder using
the parameters. Example code:
DownloadConfig.Builder builder = new DownloadConfig.Builder(Context,DOWNLOAD_URI);
builder.setTitle("Download")
DownloadConfig config = builder.build();
SystemCapability.Miscservices#DOWNLOAD| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
DownloadConfig.Builder |
Provides
Builder objects of download configuration,
including methods to set parameters used to create a download session. |
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
NETWORK_MOBILE |
Bit flag indicating download is allowed when using the cellular network.
|
static int |
NETWORK_WIFI |
Bit flag indicating download is allowed when using the WLAN.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
marshalling(Parcel parcel) |
Marshals a
DownloadConfig object into a Parcel. |
boolean |
unmarshalling(Parcel parcel) |
Unmarshals a
DownloadConfig object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final int NETWORK_MOBILE
public static final int NETWORK_WIFI
public boolean marshalling(Parcel parcel)
DownloadConfig object into a Parcel.marshalling 在接口中 Sequenceableparcel - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel parcel)
DownloadConfig object from a Parcel.unmarshalling 在接口中 Sequenceableparcel - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.
contains the key-value pair types not supported by Parcel.