I hereby claim:
- I am alexwen on github.
- I am alexwen (https://keybase.io/alexwen) on keybase.
- I have a public key whose fingerprint is 0C86 5360 CE0D 4432 822D E8F7 2DE4 5ADF DBFB D556
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
2014-12-01_22:52:48.24749 2014-12-01T22:52:48.247Z - error: Error: getaddrinfo ENOTFOUND | |
2014-12-01_22:52:48.24751 at errnoException (dns.js:37:11) | |
2014-12-01_22:52:48.24752 at Object.onanswer [as oncomplete] (dns.js:124:16) |
/* | |
* Copyright (C) 2014 Square, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
public Observable<FilesWrapper> download(List<Thing> things) { | |
return Observable.from(things) | |
.flatMap(thing -> { | |
File file = new File(getExternalCacheDir() + File.separator + thing.getName()); | |
if (file.exists()) { | |
return Observable.just(file); | |
} | |
Request request = new Request.Builder().url(thing.getUrl()).build(); |
package net.loshodges; | |
import org.junit.Test; | |
import rx.Observable; | |
import rx.observers.TestSubscriber; | |
import rx.schedulers.Schedulers; | |
import java.util.List; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.ThreadLocalRandom; |