⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jcrespec08rmi.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><PRE CLASS="ScreenText"><A NAME="pgfId-429334"></A>null_array_param {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429336"></A>      u1 length = 0xFF</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429338"></A>    }</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429340"></A>boolean_array_param {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429342"></A>      u1 length != 0xFF</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429344"></A>      <KBD CLASS="Filename-Command">u1 boolean_value[length]</KBD></PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429346"></A>    }</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429424"></A>byte_array_param {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429422"></A>      u1 length != 0xFF</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429420"></A>      s1 byte_value[length]</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429418"></A>    }</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429416"></A>short_array_param {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429414"></A>      u1 length != 0xFF</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429412"></A>      s2 short_value[length]</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429497"></A>    }</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429495"></A>int_array_param {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429493"></A>      u1 length != 0xFF</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429491"></A>      s4 int_value[length]</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429489"></A>    }</PRE></TD></TR></TBODY></TABLE><BR></DIV><BR><HR NOSHADE SIZE=1><TABLE CLASS="TipNote" DIR="LTR" WIDTH="100%" SUMMARY="TipNote"><COLGROUP SPAN="1" WIDTH="100%"><TR ALIGN="left" VALIGN="top"><TD ROWSPAN="1" COLSPAN="1" ABBR="TipNoteText"><P CLASS="TipNote"><B CLASS="TipNote">Note - </B><A NAME="pgfId-411406"></A>The <KBD CLASS="Filename-Command">length</KBD> field in each of this array data structure represents the number of elements of the array, not its size in bytes.</P></TD></TR></TABLE><HR NOSHADE SIZE=1><BR><H3 CLASS="Head2"><A NAME="pgfId-411268"></A>8.3.5	<A NAME="21974"></A>Return <A NAME="marker-420193"></A>Value <A NAME="marker-420189"></A>Encoding</H3><P CLASS="Paragraph"><A NAME="pgfId-417203"></A>A return value may be any of the parameter types described in the previous section encapsulated within a normal response format. In addition, the return value may represent a remote object reference type, a <KBD CLASS="Filename-Command">null</KBD> return type, various exceptions and the error type.</P><P CLASS="Paragraph"><A NAME="pgfId-412645"></A>The generic structure of a return value is as follows:</P><DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><PRE CLASS="ScreenText"><A NAME="pgfId-429564"></A>return_response {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429566"></A>      u1 tag</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429568"></A>      u1[] value</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429570"></A>    }</PRE></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-417220"></A>The return value using the <KBD CLASS="Filename-Command">return_response</KBD> encoding is always followed by a good completion status code of <KBD CLASS="Filename-Command">0x9000</KBD> in the response APDU.</P><H4 CLASS="Head3"><A NAME="pgfId-412713"></A>8.3.5.1	<A NAME="62334"></A>Normal Response <A NAME="marker-420190"></A>Encoding</H4><P CLASS="Paragraph"><A NAME="pgfId-412584"></A>A normal response encapsulates primitive return types, arrays of primitive data types using the same format for the <KBD CLASS="Filename-Command">param</KBD> item, as described in <A HREF="JCRESpec08rmi.html#80609" CLASS="XRef">Section 8.3.4, Parameter Encoding</A><EM CLASS="Z-Xref">,</EM> using the following format:</P><DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><PRE CLASS="ScreenText"><A NAME="pgfId-429622"></A>normal_param_response {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429624"></A>      u1 normal_tag = 0x81</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429626"></A>      param normal_value</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429628"></A>    }</PRE></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-417237"></A>The <KBD CLASS="Filename-Command">null_array_param</KBD> format described in <A HREF="JCRESpec08rmi.html#80609" CLASS="XRef">Section 8.3.4, Parameter Encoding</A> is not used to represent a <KBD CLASS="Filename-Command">null</KBD> array reference. Instead, a null object reference, as well as a null array reference, shares the following common format:</P><DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><PRE CLASS="ScreenText"><A NAME="pgfId-429679"></A>normal_null_response {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429681"></A>      u1 normal_tag = 0x81</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429683"></A>      ref_null null_array_or_ref</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429685"></A>    }</PRE></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-417235"></A>In addition, a remote object reference descriptor type is also encapsulated using the normal response format as follows:</P><DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><PRE CLASS="ScreenText"><A NAME="pgfId-429740"></A>normal_ref_response {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429742"></A>      u1 normal_tag = 0x81</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429744"></A>      <KBD CLASS="Filename-Command">remote_ref_descriptor remote_ref</KBD></PRE><PRE CLASS="ScreenText"><A NAME="pgfId-429746"></A>    <KBD CLASS="Filename-Command">}</KBD></PRE></TD></TR></TBODY></TABLE><BR></DIV><H4 CLASS="Head3"><A NAME="pgfId-411424"></A>8.3.5.2	<A NAME="marker-420192"></A>Exception Response <A NAME="marker-420191"></A>Encoding</H4><P CLASS="Paragraph"><A NAME="pgfId-411425"></A>Following is the encoding when an API defined exception is thrown by the remote method. It may be returned during any remote method invocation. The <KBD CLASS="Filename-Command">reason</KBD> item is the Java Card platform exception reason code, or <KBD CLASS="Filename-Command">0</KBD> for a <KBD CLASS="Filename-Command">java.lang,</KBD> <KBD CLASS="Filename-Command">java.rmi</KBD> or <KBD CLASS="Filename-Command">java.io</KBD> exceptions:</P><DIV CLASS="Code"><BR><TABLE CLASS="Code" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><TBODY><TR><TD SCOPE="ROW"><PRE CLASS="ScreenText"><A NAME="pgfId-430061"></A>exception_response {</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-430063"></A>      u1 exception_tag = 0x82</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-430065"></A>      u1 exception_type</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-430067"></A>      s2 reason</PRE><PRE CLASS="ScreenText"><A NAME="pgfId-430069"></A>    }</PRE></TD></TR></TBODY></TABLE><BR></DIV><P CLASS="Paragraph"><A NAME="pgfId-412819"></A>Following are the values for the <KBD CLASS="Filename-Command">exception_type</KBD> item:</P><PRE CLASS="Codeline"><A NAME="pgfId-415991"></A>java.lang.Throwable = 0x00</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419078"></A>java.lang.ArithmeticException = 0x01</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419083"></A>java.lang.ArrayIndexOutOfBoundsException = 0x02</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419094"></A>java.lang.ArrayStoreException = 0x03</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419152"></A>java.lang.ClassCastException = 0x04</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419149"></A>java.lang.Exception = 0x05</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419204"></A>java.lang.IndexOutOfBoundsException = 0x06</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419208"></A>java.lang.NegativeArraySizeException = 0x07</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419212"></A>java.lang.NullPointerException = 0x08</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419216"></A>java.lang.RuntimeException = 0x09</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419220"></A>java.lang.SecurityException = 0x0A</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419224"></A>java.io.IOException = 0x0B</PRE><PRE CLASS="Codeline"><A NAME="pgfId-419160"></A>java.rmi.RemoteException = 0x0C</PRE><PRE CLASS="Codeline"><A NAME="pgfId-413152"></A>javacard.framework.APDUException = 0x20</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412855"></A>javacard.framework.CardException = 0x21</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412857"></A>javacard.framework.CardRuntimeException = 0x22</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412859"></A>javacard.framework.ISOException = 0x23</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412861"></A>javacard.framework.PINException = 0x24</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412863"></A>javacard.framework.SystemException = 0x25</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412865"></A>javacard.framework.TransactionException = 0x26</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412867"></A>javacard.framework.UserException = 0x27</PRE><PRE CLASS="Codeline"><A NAME="pgfId-413315"></A>javacard.security.CryptoException = 0x30</PRE><PRE CLASS="Codeline"><A NAME="pgfId-412820"></A>javacard.framework.service.ServiceException = 0x40</PRE><PRE CLASS="Codeline"><A NAME="pgfId-430363"></A>javacardx.biometry.BioException = 0x50</PRE><PRE CLASS="Codeline"><A NAME="pgfId-430364"></A>javacardx.external.ExternalException = 0x60</PRE><PRE CLASS="Codeline"><A NAME="pgfId-430365"></A>javacardx.framework.tlv.TLVException = 0x70</PRE><PRE CLASS="Codeline"><A NAME="pgfId-430366"></A>javacardx.framework.util.UtilException = 0x80</PRE><P CLASS="Paragraph"><A NAME="pgfId-429843"></A>Following is the encoding when a user defined exception is thrown by the remote method. The <KBD CLASS="Filename-Command">exception_type</KBD> item represents the closest API defined exception type. It may be returned during any remote method invocation. The <KBD CLASS="Filename-Command">reason</KBD> item is the Java Card platform exception reason code, or <KBD CLASS="Filename-Command">0</KBD> for the subclasses of <KBD CLASS="Filename-Command">java.lang</KBD>,<KBD CLASS="Filename-Command"> java.rmi</KBD> or <KBD CLASS="Filename-Command">java.io</KBD> exceptions:</P><DIV CLASS="Code"><BR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -