mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
file system refactoring
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@945 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
a67ea1b688
commit
f6dbbef90f
53 changed files with 855 additions and 724 deletions
|
@ -30,14 +30,10 @@ import org.geometerplus.zlibrary.core.language.ZLLanguageDetector;
|
|||
|
||||
public abstract class FormatPlugin {
|
||||
public abstract boolean acceptsFile(ZLFile file);
|
||||
|
||||
public abstract boolean readDescription(String path, BookDescription description);
|
||||
public abstract boolean readDescription(ZLFile file, BookDescription description);
|
||||
public abstract boolean readModel(BookDescription description, BookModel model);
|
||||
|
||||
public FormatInfoPage createInfoPage(ZLOptionsDialog d, String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
public static void detectEncodingAndLanguage(BookDescription description, InputStream stream) throws IOException {
|
||||
String language = description.getLanguage();
|
||||
String encoding = description.getEncoding();
|
||||
|
@ -70,7 +66,7 @@ public abstract class FormatPlugin {
|
|||
}
|
||||
}
|
||||
//Last working version
|
||||
/*public static void detectEncodingAndLanguage(BookDescription description, InputStream stream) {
|
||||
public static void detectEncodingAndLanguage(BookDescription description, InputStream stream) {
|
||||
String encoding = description.getEncoding();
|
||||
if (encoding.length() == 0) {
|
||||
encoding = EncodingDetector.detect(stream, PluginCollection.instance().DefaultLanguageOption.getValue());
|
||||
|
@ -99,8 +95,4 @@ public abstract class FormatPlugin {
|
|||
/*}
|
||||
|
||||
}*/
|
||||
|
||||
static class FormatInfoPage {
|
||||
protected FormatInfoPage() {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue