public class Url extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Url.DownloadContent
网络下载内容对象
|
| 构造器和说明 |
|---|
Url() |
public static boolean ping(String url, int timeout)
true if the response code is in
the 200-399 range.url - The HTTP URL to be pinged.timeout - The timeout in millis for both the connection timeout and the response read timeout. Note that
the total timeout is effectively two times the given timeout.true if the given HTTP URL has returned response code 200-399 on a HEAD request within the
given timeout, otherwise false.public static Url.DownloadContent download(String fileUrl)
fileUrl - 指定链接Copyright © 2018. All rights reserved.