public class PageViewDownloader extends Object
Constructor and Description |
---|
PageViewDownloader(File dir) |
Modifier and Type | Method and Description |
---|---|
TreeMap<org.joda.time.DateTime,File> |
download(org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate) |
TreeMap<org.joda.time.DateTime,File> |
download(org.joda.time.DateTime startDate,
int numHours) |
TreeMap<org.joda.time.DateTime,File> |
download(SortedSet<org.joda.time.DateTime> timestamps) |
static boolean |
ping(String url,
int timeout)
From http://stackoverflow.com/questions/3584210/preferred-java-way-to-ping-a-http-url-for-availability
Pings a HTTP URL.
|
public PageViewDownloader(File dir)
public TreeMap<org.joda.time.DateTime,File> download(org.joda.time.DateTime startDate, int numHours) throws WikiBrainException
WikiBrainException
public TreeMap<org.joda.time.DateTime,File> download(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate) throws WikiBrainException
WikiBrainException
public TreeMap<org.joda.time.DateTime,File> download(SortedSet<org.joda.time.DateTime> timestamps) throws WikiBrainException
WikiBrainException
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
.Copyright © 2015. All rights reserved.