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.streams.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
try {
return new File(fakeSource.toURI());
} catch (URISyntaxException e) {
- Instance.getTraceHandler()
- .error(new IOException(
- "Cannot get the source file from the info-text URL",
- e));
+ Instance.getInstance().getTraceHandler()
+ .error(new IOException("Cannot get the source file from the info-text URL", e));
}
return null;
try {
fakeIn.reset();
} catch (IOException e) {
- Instance.getTraceHandler()
- .error(new IOException(
- "Cannot reset the Epub Text stream", e));
+ Instance.getInstance().getTraceHandler().error(new IOException("Cannot reset the Epub Text stream", e));
}
return fakeIn;
ZipInputStream zipIn = null;
try {
zipIn = new ZipInputStream(in);
- tmpDir = Instance.getTempFiles().createTempDir(
- "fanfic-reader-parser");
+ tmpDir = Instance.getInstance().getTempFiles().createTempDir("fanfic-reader-parser");
File tmp = new File(tmpDir, "file.txt");
File tmpInfo = new File(tmpDir, "file.info");
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;
}
try {
cover = new Image(zipIn);
} catch (Exception e) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
}
}
} else if (entry.getName().equals(getDataPrefix() + "URL")) {