apdu.html
来自「JAVA CARD 开发包规格说明,版本为2.2.2」· HTML 代码 · 共 1,404 行 · 第 1/5 页
HTML
1,404 行
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#PROTOCOL_T1">PROTOCOL_T1</A></B></CODE><BR> ISO 7816 transport protocol type T=1.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#PROTOCOL_TYPE_MASK">PROTOCOL_TYPE_MASK</A></B></CODE><BR> Type nibble mask in protocol byte</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_ERROR_IO">STATE_ERROR_IO</A></B></CODE><BR> This error state of a <CODE>APDU</CODE> object occurs when an <CODE>APDUException</CODE> with reason code <CODE>APDUException.IO_ERROR</CODE> has been thrown.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_ERROR_NO_T0_GETRESPONSE">STATE_ERROR_NO_T0_GETRESPONSE</A></B></CODE><BR> This error state of a <CODE>APDU</CODE> object occurs when an <CODE>APDUException</CODE> with reason code <CODE>APDUException.NO_T0_GETRESPONSE</CODE> has been thrown.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_ERROR_NO_T0_REISSUE">STATE_ERROR_NO_T0_REISSUE</A></B></CODE><BR> This error state of a <CODE>APDU</CODE> object occurs when an <CODE>APDUException</CODE> with reason code <CODE>APDUException.NO_T0_REISSUE</CODE> has been thrown.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_ERROR_T1_IFD_ABORT">STATE_ERROR_T1_IFD_ABORT</A></B></CODE><BR> This error state of a <CODE>APDU</CODE> object occurs when an <CODE>APDUException</CODE> with reason code <CODE>APDUException.T1_IFD_ABORT</CODE> has been thrown.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_FULL_INCOMING">STATE_FULL_INCOMING</A></B></CODE><BR> This is the state of a <CODE>APDU</CODE> object when all the incoming data been received.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_FULL_OUTGOING">STATE_FULL_OUTGOING</A></B></CODE><BR> This is the state of a <CODE>APDU</CODE> object when all outbound data has been transferred.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_INITIAL">STATE_INITIAL</A></B></CODE><BR> This is the state of a new <CODE>APDU</CODE> object when only the command header is valid.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_OUTGOING">STATE_OUTGOING</A></B></CODE><BR> This is the state of a new <CODE>APDU</CODE> object when data transfer mode is outbound but length is not yet known.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_OUTGOING_LENGTH_KNOWN">STATE_OUTGOING_LENGTH_KNOWN</A></B></CODE><BR> This is the state of a <CODE>APDU</CODE> object when data transfer mode is outbound and outbound length is known.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_PARTIAL_INCOMING">STATE_PARTIAL_INCOMING</A></B></CODE><BR> This is the state of a <CODE>APDU</CODE> object when incoming data has partially been received.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#STATE_PARTIAL_OUTGOING">STATE_PARTIAL_OUTGOING</A></B></CODE><BR> This is the state of a <CODE>APDU</CODE> object when some outbound data has been transferred but not all.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getBuffer()">getBuffer</A></B>()</CODE><BR> Returns the APDU buffer byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getCLAChannel()">getCLAChannel</A></B>()</CODE><BR> Returns the logical channel number associated with the current <CODE>APDU</CODE> command based on the CLA byte.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../javacard/framework/APDU.html" title="class in javacard.framework">APDU</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getCurrentAPDU()">getCurrentAPDU</A></B>()</CODE><BR> This method is called during the <code>Applet.process(APDU)</code> method to obtain a reference to the current <CODE>APDU</CODE> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getCurrentAPDUBuffer()">getCurrentAPDUBuffer</A></B>()</CODE><BR> This method is called during the <code>Applet.process(APDU)</code> method to obtain a reference to the current APDU buffer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getCurrentState()">getCurrentState</A></B>()</CODE><BR> This method returns the current processing state of the <CODE>APDU</CODE> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getInBlockSize()">getInBlockSize</A></B>()</CODE><BR> Returns the configured incoming block size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getIncomingLength()">getIncomingLength</A></B>()</CODE><BR> Returns the incoming data length(Lc).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getNAD()">getNAD</A></B>()</CODE><BR> Returns the Node Address byte (NAD) in T=1 protocol, and 0 in T=0 protocol.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getOffsetCdata()">getOffsetCdata</A></B>()</CODE><BR> Returns the offset within the APDU buffer for incoming command data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getOutBlockSize()">getOutBlockSize</A></B>()</CODE><BR> Returns the configured outgoing block size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#getProtocol()">getProtocol</A></B>()</CODE><BR> Returns the ISO 7816 transport protocol type, T=1 or T=0 in the low nibble and the transport media in the upper nibble in use.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#isCommandChainingCLA()">isCommandChainingCLA</A></B>()</CODE><BR> Returns whether the current <CODE>APDU</CODE> command is the first or part of a command chain.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#isISOInterindustryCLA()">isISOInterindustryCLA</A></B>()</CODE><BR> Returns whether the current <CODE>APDU</CODE> command CLA byte corresponds to an interindustry command as defined in ISO 7816-4:2005 specification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#isSecureMessagingCLA()">isSecureMessagingCLA</A></B>()</CODE><BR> Returns <CODE>true</CODE> if the encoding of the current <CODE>APDU</CODE> command based on the CLA byte indicates secure messaging.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#receiveBytes(short)">receiveBytes</A></B>(short bOff)</CODE><BR> Gets as many data bytes as will fit without APDU buffer overflow, at the specified offset <code>bOff</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#sendBytes(short, short)">sendBytes</A></B>(short bOff, short len)</CODE><BR> Sends <code>len</code> more bytes from APDU buffer at specified offset <code>bOff</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/framework/APDU.html#sendBytesLong(byte[], short, short)">sendBytesLong</A></B>(byte[] outData, short bOff, short len)</CODE><BR> Sends <code>len</code> more bytes from <code>outData</code> byte array starting at specified offset <code>bOff</code>.</TD></TR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?