当前位置: 首页>>代码示例>>Java>>正文


Java Paths类代码示例

本文整理汇总了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) {
		}
	}
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:9,代码来源:BookCollectionShadow.java

示例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);
	}
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:29,代码来源:Book.java

示例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) {
	}
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:13,代码来源:Base64EncodedImage.java

示例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;
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:10,代码来源:JavaBookModel.java

示例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;
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:8,代码来源:WallpapersUtil.java

示例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;
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:29,代码来源:AndroidFontUtil.java

示例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) {
		}
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:11,代码来源:BookCollectionShadow.java

示例8: LibraryImplementation

import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
LibraryImplementation() {
	myDatabase = SQLiteBooksDatabase.Instance(LibraryService.this);
	reset(Paths.BookPathOption().getValue(), true);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:5,代码来源:LibraryService.java

示例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);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:6,代码来源:JavaBookModel.java

示例10: LibraryImplementation

import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
LibraryImplementation() {
	myDatabase = SQLiteBooksDatabase.Instance(LibraryService.this);
	reset(Collections.singletonList(Paths.BooksDirectoryOption().getValue()), true);
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:5,代码来源:LibraryService.java

示例11: externalWallpaperFiles

import org.geometerplus.fbreader.Paths; //导入依赖的package包/类
public static List<ZLFile> externalWallpaperFiles() {
	return ZLFile.createFileByPath(Paths.WallpapersDirectoryOption().getValue()).children();
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:4,代码来源:WallpapersUtil.java

示例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");
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:7,代码来源:FileFirstLevelTree.java


注:本文中的org.geometerplus.fbreader.Paths类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。