Package net.fabricmc.loom.util.download
Class DownloadBuilder
java.lang.Object
net.fabricmc.loom.util.download.DownloadBuilder
-
Method Summary
Modifier and TypeMethodDescriptionconnectTimeout(Duration duration) 覆盖连接超时.downloadPath(Path path) downloadPathAsync(Path path, DownloadExecutor executor) downloadString(Path cache) etag(boolean useEtag) httpVersion(HttpClient.Version httpVersion) maxRetries(int maxRetries) offline()progress(DownloadProgressListener progressListener) requestTimeout(Duration duration) 覆盖单次请求超时(不含重试).
-
Method Details
-
sha1
-
etag
-
forceDownload
-
offline
-
maxAge
-
progress
-
maxRetries
-
defaultCache
-
connectTimeout
覆盖连接超时.默认值见
Download.DEFAULT_CONNECT_TIMEOUT。给「拉不到就快速过去」的探测型下载 用更短的值,避免一次网络抖动把整个构建挂上数分钟。 -
requestTimeout
覆盖单次请求超时(不含重试). -
allowInsecureProtocol
-
httpVersion
-
downloadPathAsync
-
downloadPath
- Throws:
DownloadException
-
downloadString
- Throws:
DownloadException
-
downloadString
- Throws:
DownloadException
-