@Meta(def = "An error occured when contacting the library", format = Format.STRING, description = "default description if the error is not known")
ERROR_LIB_STATUS, //
@Meta(def = "You are not allowed to access this library", format = Format.STRING, description = "library access not allowed")
- ERROR_LIB_STATUS_UNAUTORIZED, //
+ ERROR_LIB_STATUS_UNAUTHORIZED, //
@Meta(def = "Library not valid", format = Format.STRING, description = "the library is invalid (not correctly set up)")
ERROR_LIB_STATUS_INVALID, //
@Meta(def = "Library currently unavailable", format = Format.STRING, description = "the library is out of commission")
ERROR_LIB_STATUS = An error occured when contacting the library
# library access not allowed
# (FORMAT: STRING)
-ERROR_LIB_STATUS_UNAUTORIZED = You are not allowed to access this library
+ERROR_LIB_STATUS_UNAUTHORIZED = You are not allowed to access this library
# the library is invalid (not correctly set up)
# (FORMAT: STRING)
ERROR_LIB_STATUS_INVALID = Library not valid
ERROR_LIB_STATUS = Une erreur est survenue en contactant la librairie
# library access not allowed
# (FORMAT: STRING)
-ERROR_LIB_STATUS_UNAUTORIZED = Vous n'étes pas autorisé à accéder à cette librairie
+ERROR_LIB_STATUS_UNAUTHORIZED = Vous n'étes pas autorisé à accéder à cette librairie
# the library is invalid (not correctly set up)
# (FORMAT: STRING)
ERROR_LIB_STATUS_INVALID = Librairie invalide
import be.nikiroo.fanfix.data.Story;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.Image;
-import be.nikiroo.utils.MarkableFileInputStream;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
import be.nikiroo.utils.Progress;
/**
InputStream cbzIn = null;
ZipInputStream zipIn = null;
try {
- cbzIn = new MarkableFileInputStream(new FileInputStream(
- getSourceFileOriginal()));
+ cbzIn = new MarkableFileInputStream(getSourceFileOriginal());
zipIn = new ZipInputStream(cbzIn);
for (ZipEntry entry = zipIn.getNextEntry(); entry != null; entry = zipIn
.getNextEntry()) {
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.streams.MarkableFileInputStream;
import be.nikiroo.utils.StringUtils;
/**
}
if (tmp.exists()) {
- this.fakeIn = new MarkableFileInputStream(new FileInputStream(
- tmp));
+ this.fakeIn = new MarkableFileInputStream(tmp);
}
if (tmpInfo.exists()) {
import be.nikiroo.fanfix.bundles.Config;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.Image;
-import be.nikiroo.utils.MarkableFileInputStream;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
// not complete: no "description" tag
public class InfoReader {
}
if (infoFile.exists()) {
- InputStream in = new MarkableFileInputStream(new FileInputStream(
- infoFile));
+ InputStream in = new MarkableFileInputStream(infoFile);
try {
return createMeta(infoFile.toURI().toURL(), in, withCover);
} finally {
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.Image;
import be.nikiroo.utils.ImageUtils;
-import be.nikiroo.utils.MarkableFileInputStream;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
import be.nikiroo.utils.Progress;
/**
protected Document loadDocument(URL source) throws IOException {
try {
sourceFile = new File(source.toURI());
- in = new MarkableFileInputStream(new FileInputStream(sourceFile));
+ in = new MarkableFileInputStream(sourceFile);
} catch (URISyntaxException e) {
throw new IOException("Cannot load the text document: " + source);
}