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


Java SerializerUtil.deserializeBook方法代码示例

本文整理汇总了Java中org.geometerplus.fbreader.book.SerializerUtil.deserializeBook方法的典型用法代码示例。如果您正苦于以下问题:Java SerializerUtil.deserializeBook方法的具体用法?Java SerializerUtil.deserializeBook怎么用?Java SerializerUtil.deserializeBook使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.geometerplus.fbreader.book.SerializerUtil的用法示例。


在下文中一共展示了SerializerUtil.deserializeBook方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: openBook

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
private synchronized void openBook(Intent intent, Runnable action, boolean force)
{
	if (!force && myBook != null) { return; }
	myBook = SerializerUtil.deserializeBook(intent.getStringExtra(BOOKMARK_KEY));
	final Bookmark bookmark = SerializerUtil.deserializeBookmark(intent.getStringExtra(BOOKMARK_KEY));

	String fromIntentBookKey = intent.getStringExtra(BOOK_KEY);
	if (!TextUtils.isEmpty(fromIntentBookKey))
	{
		myBook = createBookForFile(ZLFile.createFileByPath(fromIntentBookKey));
	}
	else
	{
		if (myBook == null)
		{
			final Uri data = intent.getData();
			if (data != null)
			{
				myBook = createBookForFile(ZLFile.createFileByPath(data.getPath()));
			}
		}
	}
	boolean gotoPosition = getIntent().getBooleanExtra("goto_position", true);
	myFBReaderApp.openBook(myBook, bookmark, action, gotoPosition);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:26,代码来源:FBReader.java

示例2: onCreate

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle bundle) {
	super.onCreate(bundle);
	// Thread.setDefaultUncaughtExceptionHandler(new
	// org.geometerplus.zlibrary.ui.android.library.UncaughtExceptionHandler(this));
	//requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);

	// requestWindowFeature(Window.FEATURE_NO_TITLE);
	setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
	// ADD ACTIONBAR
	bar = this.getActionBar();
	bar.setTitle("书签管理");
	bar.setDisplayHomeAsUpEnabled(true);
	bar.setDisplayShowHomeEnabled(true);
	bar.setDisplayShowTitleEnabled(true);
	//
	final SearchManager manager = (SearchManager) getSystemService(SEARCH_SERVICE);
	manager.setOnCancelListener(null);

	final TabHost host = getTabHost();
	LayoutInflater.from(this).inflate(R.layout.bookmarks,
			host.getTabContentView(), true);
	myBook = SerializerUtil.deserializeBook(getIntent().getStringExtra(
			CoreReadActivity.BOOK_KEY));
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:26,代码来源:BookmarksActivity.java

示例3: onReceive

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public void onReceive(Context context, Intent intent) {
	if (!hasListeners()) {
		return;
	}

	try {
		final String type = intent.getStringExtra("type");
		if (LibraryService.BOOK_EVENT_ACTION.equals(intent.getAction())) {
			final Book book = SerializerUtil.deserializeBook(intent.getStringExtra("book"));
			fireBookEvent(BookEvent.valueOf(type), book);
		} else {
			fireBuildEvent(Status.valueOf(type));
		}
	} catch (Exception e) {
		// ignore
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:18,代码来源:BookCollectionShadow.java

示例4: onCreate

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle icicle) {
	super.onCreate(icicle);

	if (myRootTree == null) {
		myRootTree = new RootTree(new BookCollectionShadow());
	}
	myRootTree.Collection.addListener(this);

	mySelectedBook =
		SerializerUtil.deserializeBook(getIntent().getStringExtra(CoreReadActivity.BOOK_KEY));

	new LibraryTreeAdapter(this);

	init(getIntent());

	getListView().setTextFilterEnabled(true);
	getListView().setOnCreateContextMenuListener(this);

	((BookCollectionShadow)myRootTree.Collection).bindToService(this, new Runnable() {
		public void run() {
			setProgressBarIndeterminateVisibility(!myRootTree.Collection.status().IsCompleted);
		}
	});
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:26,代码来源:LibraryActivity.java

示例5: openBook

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
private synchronized void openBook(Intent intent, Runnable action,
		boolean force) {
	if (!force && myBook != null) {
		return;
	}
	myBook = SerializerUtil
			.deserializeBook(intent.getStringExtra(BOOK_KEY));
	final Bookmark bookmark = SerializerUtil.deserializeBookmark(intent
			.getStringExtra(BOOKMARK_KEY));
	if (myBook == null) {
		final Uri data = intent.getData();
		if (data != null) {
			this.myBook = createBookForFile(ZLFile.createFileByPath(data
					.getPath()));
		}
	}
	myFBReaderApp.openBook(myBook, bookmark, action);
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:19,代码来源:CoreReadActivity.java

示例6: getRecentBook

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public synchronized Book getRecentBook(int index) {
	if (myInterface == null) {
		return null;
	}
	try {
		return SerializerUtil.deserializeBook(myInterface.getRecentBook(index));
	} catch (RemoteException e) {
		return null;
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:11,代码来源:BookCollectionShadow.java

示例7: getBookByFile

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public synchronized Book getBookByFile(ZLFile file) {
	if (myInterface == null) {
		return null;
	}
	try {
		return SerializerUtil.deserializeBook(myInterface.getBookByFile(file.getPath()));
	} catch (RemoteException e) {
		return null;
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:11,代码来源:BookCollectionShadow.java

示例8: getBookById

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public synchronized Book getBookById(long id) {
	if (myInterface == null) {
		return null;
	}
	try {
		return SerializerUtil.deserializeBook(myInterface.getBookById(id));
	} catch (RemoteException e) {
		return null;
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:11,代码来源:BookCollectionShadow.java

示例9: getBookByUid

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public synchronized Book getBookByUid(UID uid) {
	if (myInterface == null) {
		return null;
	}
	try {
		return SerializerUtil.deserializeBook(myInterface.getBookByUid(uid.Type, uid.Id));
	} catch (RemoteException e) {
		return null;
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:11,代码来源:BookCollectionShadow.java

示例10: bookByIntent

import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public static Book bookByIntent(Intent intent) {
	return intent != null ?
		SerializerUtil.deserializeBook(intent.getStringExtra(CoreReadActivity.BOOK_KEY)) : null;
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:5,代码来源:BookInfoActivity.java


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