本文整理汇总了Java中org.geometerplus.fbreader.book.SerializerUtil.deserializeBookmark方法的典型用法代码示例。如果您正苦于以下问题:Java SerializerUtil.deserializeBookmark方法的具体用法?Java SerializerUtil.deserializeBookmark怎么用?Java SerializerUtil.deserializeBookmark使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.geometerplus.fbreader.book.SerializerUtil
的用法示例。
在下文中一共展示了SerializerUtil.deserializeBookmark方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}
示例3: addBookmark
import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
private void addBookmark() {
final Bookmark bookmark = SerializerUtil
.deserializeBookmark(getIntent().getStringExtra(
CoreReadActivity.BOOKMARK_KEY));
if (bookmark != null) {
myCollection.saveBookmark(bookmark);
myThisBookAdapter.add(bookmark);
myAllBooksAdapter.add(bookmark);
}
}
示例4: saveBookmark
import org.geometerplus.fbreader.book.SerializerUtil; //导入方法依赖的package包/类
public String saveBookmark(String serialized) {
final Bookmark bookmark = SerializerUtil.deserializeBookmark(serialized);
myCollection.saveBookmark(bookmark);
return SerializerUtil.serialize(bookmark);
}