public static class DownloadMgrInitialParams.InitCustomMaker
extends java.lang.Object
| Constructor and Description |
|---|
InitCustomMaker(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit() |
DownloadMgrInitialParams.InitCustomMaker |
connectionCountAdapter(FileDownloadHelper.ConnectionCountAdapter adapter) |
DownloadMgrInitialParams.InitCustomMaker |
connectionCreator(FileDownloadHelper.ConnectionCreator creator)
Customize the connection component.
|
DownloadMgrInitialParams.InitCustomMaker |
database(FileDownloadHelper.DatabaseCustomMaker maker) |
DownloadMgrInitialParams.InitCustomMaker |
foregroundServiceConfig(ForegroundServiceConfig config) |
DownloadMgrInitialParams.InitCustomMaker |
idGenerator(FileDownloadHelper.IdGenerator idGenerator) |
DownloadMgrInitialParams.InitCustomMaker |
maxNetworkThreadCount(int maxNetworkThreadCount)
The max thread count in OkDownload thread pool is Integer.MAX,
this configuration is useless.
|
DownloadMgrInitialParams.InitCustomMaker |
outputStreamCreator(FileDownloadHelper.OutputStreamCreator creator)
Customize the output stream component.
|
public DownloadMgrInitialParams.InitCustomMaker idGenerator(FileDownloadHelper.IdGenerator idGenerator)
public DownloadMgrInitialParams.InitCustomMaker connectionCountAdapter(FileDownloadHelper.ConnectionCountAdapter adapter)
public DownloadMgrInitialParams.InitCustomMaker database(FileDownloadHelper.DatabaseCustomMaker maker)
public DownloadMgrInitialParams.InitCustomMaker maxNetworkThreadCount(int maxNetworkThreadCount)
public DownloadMgrInitialParams.InitCustomMaker outputStreamCreator(FileDownloadHelper.OutputStreamCreator creator)
If you don't customize the output stream component, we use the result of
DownloadUriOutputStream as the default one.
creator - The output stream creator is used for creating
FileDownloadOutputStream which is used to write the input stream
to the file for downloading.public DownloadMgrInitialParams.InitCustomMaker connectionCreator(FileDownloadHelper.ConnectionCreator creator)
If you don't customize the connection component, we use
DownloadUrlConnection
creator - the connection creator will used for create the connection when start
downloading any task in the FileDownloader.public DownloadMgrInitialParams.InitCustomMaker foregroundServiceConfig(ForegroundServiceConfig config)
public void commit()