import be.nikiroo.fanfix.data.Paragraph;
import be.nikiroo.fanfix.data.Paragraph.ParagraphType;
import be.nikiroo.fanfix.data.Story;
-import be.nikiroo.utils.IOUtils;
+import be.nikiroo.utils.ImageUtils;
import be.nikiroo.utils.Progress;
import be.nikiroo.utils.StringUtils;
pg.setProgress(50);
- if (meta != null && meta.getCover() == null) {
+ if (meta.getCover() == null) {
meta.setCover(getDefaultCover(meta.getSubject()));
}
* @throws IOException
* on I/O error
*/
+ @SuppressWarnings("unused")
protected void preprocess(URL source, InputStream in) throws IOException {
}
if (image != null) {
return new Paragraph(image);
- } else {
- return processPara(line);
}
+
+ return processPara(line);
}
/**
static String[] getImageExt(boolean emptyAllowed) {
if (emptyAllowed) {
return new String[] { "", ".png", ".jpg", ".jpeg", ".gif", ".bmp" };
- } else {
- return new String[] { ".png", ".jpg", ".jpeg", ".gif", ".bmp" };
}
+
+ return new String[] { ".png", ".jpg", ".jpeg", ".gif", ".bmp" };
}
/**
InputStream in = null;
try {
in = Instance.getCache().open(url, getSupport(url), true);
- return IOUtils.toImage(in);
+ return ImageUtils.fromStream(in);
} catch (IOException e) {
} finally {
if (in != null) {
if (prev == car) {
builder.append(closeDoubleQuote);
continue;
- } else {
- builder.append(closeQuote);
}
+
+ builder.append(closeQuote);
}
}