org.tinymediamanager.scraper.http.Url.getInputStreamWithRetry()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(211)

本文整理了Java中org.tinymediamanager.scraper.http.Url.getInputStreamWithRetry()方法的一些代码示例,展示了Url.getInputStreamWithRetry()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Url.getInputStreamWithRetry()方法的具体详情如下:
包路径:org.tinymediamanager.scraper.http.Url
类名称:Url
方法名:getInputStreamWithRetry

Url.getInputStreamWithRetry介绍

[英]gets the url with the given amount of retries
[中]获取具有给定重试次数的url

代码示例

代码示例来源:origin: org.tinymediamanager/api-scraper

/**
 * Gets the bytes with the given amount of retries
 *
 * @param retries
 *          the amount of retries (>0)
 * @return the bytes or an empty array
 * @throws IOException
 *           Signals that an I/O exception has occurred.
 */
public byte[] getBytesWithRetry(int retries) throws IOException {
 InputStream is = getInputStreamWithRetry(retries);
 if (is != null) {
  byte[] bytes = IOUtils.toByteArray(is);
  IOUtils.closeQuietly(is);
  return bytes;
 }
 return new byte[0];
}

代码示例来源:origin: tinyMediaManager/tinyMediaManager

is = url.getInputStreamWithRetry(5);
if (is == null) {

代码示例来源:origin: tinyMediaManager/tinyMediaManager

is = url1.getInputStreamWithRetry(5);

代码示例来源:origin: tinyMediaManager/tinyMediaManager

tempFile = movie.getPathNIO().resolve(filename + ".part");
outputStream = new FileOutputStream(tempFile.toFile());
is = url1.getInputStreamWithRetry(5);

代码示例来源:origin: tinyMediaManager/tinyMediaManager

Url url1 = new Url(url);
FileOutputStream outputStream = new FileOutputStream(tempFile.toFile());
InputStream is = url1.getInputStreamWithRetry(5);
if (is == null) {

相关文章