本文整理汇总了Java中org.geometerplus.fbreader.Paths类的典型用法代码示例。如果您正苦于以下问题:Java Paths类的具体用法?Java Paths怎么用?Java Paths使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Paths类属于org.geometerplus.fbreader包,在下文中一共展示了Paths类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reset
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
public synchronized void reset(boolean force) {
if (myInterface != null) {
try {
myInterface.reset(Paths.BookPathOption().getValue(), force);
} catch (RemoteException e) {
}
}
}
示例2: readMetaInfo
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
private void readMetaInfo(FormatPlugin plugin) throws BookReadingException {
myEncoding = null;
myLanguage = null;
setTitle(null);
myAuthors = null;
myTags = null;
mySeriesInfo = null;
myUids = null;
myIsSaved = false;
plugin.readMetaInfo(this);
if (myUids == null || myUids.isEmpty()) {
plugin.readUids(this);
}
if (isTitleEmpty()) {
final String fileName = File.getShortName();
final int index = fileName.lastIndexOf('.');
setTitle(index > 0 ? fileName.substring(0, index) : fileName);
}
final String demoPathPrefix = Paths.mainBookDirectory() + "/Demos/";
if (File.getPath().startsWith(demoPathPrefix)) {
final String demoTag = ZLResource.resource("library").getResource("demo").getValue();
setTitle(getTitle() + " (" + demoTag + ")");
addTag(demoTag);
}
}
示例3: Base64EncodedImage
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
public Base64EncodedImage(MimeType mimeType, String namePostfix) {
// TODO: use contentType
super(mimeType);
myDirName = Paths.cacheDirectory();
new File(myDirName).mkdirs();
myFileNumber = ourCounter++;
myNamePostfix = namePostfix;
try {
myStreamWriter = new OutputStreamWriter(new FileOutputStream(encodedFileName()), "UTF-8");
} catch (IOException e) {
}
}
示例4: getFootnoteModel
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
@Override
public ZLTextModel getFootnoteModel(String id) {
ZLTextModel model = myFootnotes.get(id);
if (model == null) {
model = new ZLTextWritablePlainModel(id, Book.getLanguage(), 8, 512, Paths.cacheDirectory(), "cache" + myFootnotes.size(), myImageMap);
myFootnotes.put(id, model);
}
return model;
}
示例5: externalWallpaperFiles
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
public static List<ZLFile> externalWallpaperFiles() {
final List<ZLFile> files = new ArrayList<ZLFile>();
for (String dir : Paths.WallpaperPathOption().getValue()) {
files.addAll(ZLFile.createFileByPath(dir).children());
}
return files;
}
示例6: getFontMap
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
private static Map<String,File[]> getFontMap(boolean forceReload) {
final long timeStamp = System.currentTimeMillis();
if (forceReload && timeStamp < ourTimeStamp + 1000) {
forceReload = false;
}
ourTimeStamp = timeStamp;
if (ourFileSet == null || forceReload) {
final HashSet<File> fileSet = new HashSet<File>();
final FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {
if (name.startsWith(".")) {
return false;
}
final String lcName = name.toLowerCase();
return lcName.endsWith(".ttf") || lcName.endsWith(".otf");
}
};
final File[] fileList = new File(Paths.FontsDirectoryOption().getValue()).listFiles(filter);
if (fileList != null) {
fileSet.addAll(Arrays.asList(fileList));
}
if (!fileSet.equals(ourFileSet)) {
ourFileSet = fileSet;
ourFontMap = new ZLTTFInfoDetector().collectFonts(fileSet);
}
}
return ourFontMap;
}
示例7: reset
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
public synchronized void reset(boolean force) {
if (myInterface != null) {
try {
myInterface.reset(
Collections.singletonList(Paths.BooksDirectoryOption().getValue()), force
);
} catch (RemoteException e) {
}
}
}
示例8: LibraryImplementation
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
LibraryImplementation() {
myDatabase = SQLiteBooksDatabase.Instance(LibraryService.this);
reset(Paths.BookPathOption().getValue(), true);
}
示例9: JavaBookModel
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
JavaBookModel(Book book) {
super(book);
myInternalHyperlinks = new CachedCharStorage(32768, Paths.cacheDirectory(), "links");
BookTextModel = new ZLTextWritablePlainModel(null, book.getLanguage(), 1024, 65536, Paths.cacheDirectory(), "cache", myImageMap);
}
示例10: LibraryImplementation
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
LibraryImplementation() {
myDatabase = SQLiteBooksDatabase.Instance(LibraryService.this);
reset(Collections.singletonList(Paths.BooksDirectoryOption().getValue()), true);
}
示例11: externalWallpaperFiles
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
public static List<ZLFile> externalWallpaperFiles() {
return ZLFile.createFileByPath(Paths.WallpapersDirectoryOption().getValue()).children();
}
示例12: FileFirstLevelTree
import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
FileFirstLevelTree(RootTree root) {
super(root, ROOT_FILE_TREE);
addChild(Paths.BooksDirectoryOption().getValue(), "fileTreeLibrary");
addChild("/", "fileTreeRoot");
addChild(Paths.cardDirectory(), "fileTreeCard");
}