import be.nikiroo.fanfix.supported.BasicSupport;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.MarkableFileInputStream;
import be.nikiroo.fanfix.supported.BasicSupport;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.MarkableFileInputStream;
return open(url, support, stable, url);
}
return open(url, support, stable, url);
}
*
* @throws IOException
* in case of I/O error
*/
public InputStream open(URL url, BasicSupport support, boolean stable,
URL originalUrl) throws IOException {
*
* @throws IOException
* in case of I/O error
*/
public InputStream open(URL url, BasicSupport support, boolean stable,
URL originalUrl) throws IOException {
File cached = getCached(cachedUrl);
if (!cached.exists() || isOld(cached, true)) {
File cached = getCached(cachedUrl);
if (!cached.exists() || isOld(cached, true)) {
- InputStream imageIn = Instance.getCache().open(url, null, true);
- ImageIO.write(StringUtils.toImage(imageIn), Instance.getConfig()
+ InputStream imageIn = open(url, null, true);
+ ImageIO.write(IOUtils.toImage(imageIn), Instance.getConfig()
conn.setRequestProperty("User-Agent", UA);
conn.setRequestProperty("Cookie", generateCookies(support));
conn.setRequestProperty("Accept-Encoding", "gzip");
conn.setRequestProperty("User-Agent", UA);
conn.setRequestProperty("Cookie", generateCookies(support));
conn.setRequestProperty("Accept-Encoding", "gzip");
conn.setRequestProperty("Referer", support.getCurrentReferer()
.toString());
conn.setRequestProperty("Host", support.getCurrentReferer()
conn.setRequestProperty("Referer", support.getCurrentReferer()
.toString());
conn.setRequestProperty("Host", support.getCurrentReferer()