com.foxconn.ebook.reader.engine.core
类 EngineCode

java.lang.Object
  继承者 com.foxconn.ebook.reader.engine.core.EngineCode

public class EngineCode
extends java.lang.Object

代碼類: 該類包含所有Engine處理時產生的异常或錯誤代碼.同時用來處理相關錯誤代碼.

代碼類型包含EngineMsgCode、AdobeMsgCode、FbreaderMsgCode

錯誤處理: 錯誤處理需要實現IErrorCall接口回調,當相應錯誤發生時,Engine將自動處理這些回調.

Example:

IErrorCall inputPdfPassword = new IErrorCall() {

@Override

public void handleError() {

showPdfInputDialog();

}

};

mIEREngine.setErrorHandler(AdobeMsgCode.STATE_ERROR_PDF_T3_NEED_PASSWORD, inputPdfPassword);


嵌套类摘要
static interface EngineCode.AdobeMsgCode
          Adobe相關的信息碼.
static interface EngineCode.EngineMsgCode
          Engine相關的信息代碼,包含錯誤和异常碼
static interface EngineCode.FbreaderMsgCode
          FBReader相關的信息碼.
 
方法摘要
 void free()
          釋放資源.
static EngineCode getInstance()
          獲取EngineCode單例對象.
 int getLastCode()
          後去最後信息碼.
 boolean noError(int code)
          判斷信息碼是否為錯誤信息.
 void setLastCode(int error)
          設置最後信息碼.
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

getInstance

public static EngineCode getInstance()
獲取EngineCode單例對象.

返回:
single instance of EngineCode

free

public void free()
釋放資源.


getLastCode

public int getLastCode()
後去最後信息碼.

返回:
the last code

setLastCode

public void setLastCode(int error)
設置最後信息碼.

参数:
error - the new last code

noError

public boolean noError(int code)
判斷信息碼是否為錯誤信息.

参数:
code - 信息碼
返回:
true, 不是錯誤信息碼. false, 是錯誤信息碼