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

📄 basicservice.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 3 页
字号:
setStatusWord</H3><PRE>public void <B>setStatusWord</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu,                          short&nbsp;sw)</PRE><DL><DD>Sets the response status word for the command in the <CODE>APDU</CODE> object. This method can be called regardless of the APDU processing state of the current command.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DD><CODE>sw</CODE> - the status word response for this command</DL></DD></DL><HR><A NAME="getStatusWord(javacard.framework.APDU)"><!-- --></A><H3>getStatusWord</H3><PRE>public short <B>getStatusWord</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)                    throws <A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></PRE><DL><DD>Returns the response status word for the command in the <CODE>APDU</CODE> object. This method can only be called if the APDU processing state indicates that the command has been <em>processed</em>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DT><B>Returns:</B><DD>the status word response for this command<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason code:<ul> <li><code>ServiceException.CANNOT_ACCESS_OUT_COMMAND</code> if the command is not <em>processed</em> or if the APDU object is not accessible (APDU object in STATE_ERROR_.. ) </ul><DT><B>See Also:</B><DD><A HREF="../../../javacard/framework/APDU.html#getCurrentState()"><CODE>javacard.framework.APDU.getCurrentState()</CODE></A></DL></DD></DL><HR><A NAME="fail(javacard.framework.APDU, short)"><!-- --></A><H3>fail</H3><PRE>public boolean <B>fail</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu,                    short&nbsp;sw)             throws <A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></PRE><DL><DD>Sets the processing state for the command in the <CODE>APDU</CODE> object to <em>processed</em>, and indicates that the processing has failed. Sets the output length to <CODE>0</CODE> and the status word of the response to the specified value.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DD><CODE>sw</CODE> - the status word response for this command<DT><B>Returns:</B><DD><code>true</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason code:<ul> <li><code>ServiceException.CANNOT_ACCESS_OUT_COMMAND</code> if the APDU object is not accessible (APDU object in STATE_ERROR_.. ) </ul><DT><B>See Also:</B><DD><A HREF="../../../javacard/framework/APDU.html#getCurrentState()"><CODE>javacard.framework.APDU.getCurrentState()</CODE></A></DL></DD></DL><HR><A NAME="succeed(javacard.framework.APDU)"><!-- --></A><H3>succeed</H3><PRE>public boolean <B>succeed</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)                throws <A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></PRE><DL><DD>Sets the processing state for the command in the <CODE>APDU</CODE> object to <em>processed</em>, and indicates that the processing has succeeded. Sets the status word of the response to <CODE>0x9000</CODE>. The output length of the response must be set separately.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed.<DT><B>Returns:</B><DD><code>true</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason code:<ul> <li><code>ServiceException.CANNOT_ACCESS_OUT_COMMAND</code> if the APDU object is not accessible (APDU object in STATE_ERROR_.. ) </ul><DT><B>See Also:</B><DD><A HREF="../../../javacard/framework/APDU.html#getCurrentState()"><CODE>javacard.framework.APDU.getCurrentState()</CODE></A></DL></DD></DL><HR><A NAME="succeedWithStatusWord(javacard.framework.APDU, short)"><!-- --></A><H3>succeedWithStatusWord</H3><PRE>public boolean <B>succeedWithStatusWord</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu,                                     short&nbsp;sw)                              throws <A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></PRE><DL><DD>Sets the processing state for the command in the <CODE>APDU</CODE> object to <em>processed</em>, and indicates that the processing has partially succeeded. Sets the the status word of the response to the specified value. The output length of the response must be set separately.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DD><CODE>sw</CODE> - the status word to be returned for this command<DT><B>Returns:</B><DD><code>true</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason code:<ul> <li><code>ServiceException.CANNOT_ACCESS_OUT_COMMAND</code> if the APDU object is not accessible (APDU object in STATE_ERROR_.. ) </ul><DT><B>See Also:</B><DD><A HREF="../../../javacard/framework/APDU.html#getCurrentState()"><CODE>javacard.framework.APDU.getCurrentState()</CODE></A></DL></DD></DL><HR><A NAME="getCLA(javacard.framework.APDU)"><!-- --></A><H3>getCLA</H3><PRE>public byte <B>getCLA</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)</PRE><DL><DD>Returns the class byte for the command in the <CODE>APDU</CODE> object. This method can be called regardless of the APDU processing state of the current  command.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DT><B>Returns:</B><DD>the value of the CLA byte</DL></DD></DL><HR><A NAME="getINS(javacard.framework.APDU)"><!-- --></A><H3>getINS</H3><PRE>public byte <B>getINS</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)</PRE><DL><DD>Returns the instruction byte for the command in the <CODE>APDU</CODE> object. This method can be called regardless of the APDU processing state of the current  command.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DT><B>Returns:</B><DD>the value of the INS byte</DL></DD></DL><HR><A NAME="getP1(javacard.framework.APDU)"><!-- --></A><H3>getP1</H3><PRE>public byte <B>getP1</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)           throws <A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></PRE><DL><DD>Returns the first parameter byte for the command in the <CODE>APDU</CODE> object. When invoked, the <CODE>APDU</CODE> object must be in <CODE>STATE_INITIAL</CODE> or <CODE>STATE_FULL_INCOMING</CODE>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DT><B>Returns:</B><DD>the value of the P1 byte<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason code:<ul> <li><code>ServiceException.CANNOT_ACCESS_IN_COMMAND</code> if the APDU object is not in STATE_INITIAL or in STATE_FULL_INCOMING. </li></ul></DL></DD></DL><HR><A NAME="getP2(javacard.framework.APDU)"><!-- --></A><H3>getP2</H3><PRE>public byte <B>getP2</B>(<A HREF="../../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A>&nbsp;apdu)           throws <A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></PRE><DL><DD>Returns the second parameter byte for the command in the <CODE>APDU</CODE> object. When invoked, the <CODE>APDU</CODE> object must be in <CODE>STATE_INITIAL</CODE> or <CODE>STATE_FULL_INCOMING</CODE>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>apdu</CODE> - the <CODE>APDU</CODE> object containing the command being processed<DT><B>Returns:</B><DD>the value of the P2 byte<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacard/framework/service/ServiceException.html" title="class in javacard.framework.service">ServiceException</A></CODE> - with the following reason code:<ul> <li><code>ServiceException.CANNOT_ACCESS_IN_COMMAND</code> if the APDU object is not in STATE_INITIAL or in STATE_FULL_INCOMING. </li></ul></DL></DD></DL><HR><A NAME="selectingApplet()"><!-- --></A><H3>selectingApplet</H3><PRE>public boolean <B>selectingApplet</B>()</PRE><DL><DD>This method is used to determine if the command in the <CODE>APDU</CODE> object  is the applet SELECT FILE command which selected the currently selected applet.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD><code>true</code> if applet SELECT FILE command is being processed</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BasicService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java Card </b><br><font size="-1">v2.2.2</font></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../javacard/framework/service/CardRemoteObject.html" title="class in javacard.framework.service"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javacard/framework/service/BasicService.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="BasicService.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &#169; 1993-2005 Sun Microsystems, Inc. 4150 Network Circle,<br>Santa Clara, CA, 95054, U.S.A.  All Rights Reserved.</i></BODY></HTML>

⌨️ 快捷键说明

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