package be.nikiroo.fanfix.supported;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.Image;
-import be.nikiroo.utils.MarkableFileInputStream;
import be.nikiroo.utils.StringUtils;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
/**
* Support class for EPUB files created with this program (as we need some
private URL fakeSource;
private InputStream fakeIn;
- @Override
- public String getSourceName() {
- return "epub";
- }
-
public File getSourceFileOriginal() {
return super.getSourceFile();
}
String entryLName = entry.getName().toLowerCase();
boolean imageEntry = false;
- for (String ext : BasicSupportImages.getImageExt(false)) {
+ for (String ext : bsImages.getImageExt(false)) {
if (entryLName.endsWith(ext)) {
imageEntry = true;
}
}
if (tmp.exists()) {
- this.fakeIn = new MarkableFileInputStream(new FileInputStream(
- tmp));
+ this.fakeIn = new MarkableFileInputStream(tmp);
}
if (tmpInfo.exists()) {
meta = new MetaData();
meta.setLang("en");
meta.setTags(new ArrayList<String>());
- meta.setSource(getSourceName());
+ meta.setSource(getType().getSourceName());
meta.setUuid(url);
meta.setUrl(url);
meta.setTitle(title);
if (cover != null) {
meta.setCover(cover);
} else {
-System.out.println(">>> " + getSourceFileOriginal());
meta.setCover(InfoReader
.getCoverByName(getSourceFileOriginal().toURI()
.toURL()));