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

📄 jcsystem.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 4 页
字号:
                                                  <A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></PRE><DL><DD>Creates a transient boolean array with the specified array length.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of the boolean array<DD><CODE>event</CODE> - the <code>CLEAR_ON...</code> event which causes the array elements to be cleared<DT><B>Returns:</B><DD>the new transient boolean array<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A></CODE> - if the <CODE>length</CODE> parameter is negative<DD><CODE><A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></CODE> - with the following reason codes:<ul> <li><code>SystemException.ILLEGAL_VALUE</code> if event is not a valid event code. <li><code>SystemException.NO_TRANSIENT_SPACE</code> if sufficient transient space is not available. <li><code>SystemException.ILLEGAL_TRANSIENT</code> if the current applet context is not the currently selected applet context and <code>CLEAR_ON_DESELECT</code> is specified. </ul></DL></DD></DL><HR><A NAME="makeTransientByteArray(short, byte)"><!-- --></A><H3>makeTransientByteArray</H3><PRE>public static byte[] <B>makeTransientByteArray</B>(short&nbsp;length,                                            byte&nbsp;event)                                     throws <A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A>,                                            <A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></PRE><DL><DD>Creates a transient byte array with the specified array length.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of the byte array<DD><CODE>event</CODE> - the <code>CLEAR_ON...</code> event which causes the array elements to be cleared<DT><B>Returns:</B><DD>the new transient byte array<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A></CODE> - if the <CODE>length</CODE> parameter is negative<DD><CODE><A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></CODE> - with the following reason codes:<ul> <li><code>SystemException.ILLEGAL_VALUE</code> if event is not a valid event code. <li><code>SystemException.NO_TRANSIENT_SPACE</code> if sufficient transient space is not available. <li><code>SystemException.ILLEGAL_TRANSIENT</code> if the current applet context is not the currently selected applet context and <code>CLEAR_ON_DESELECT</code> is specified. </ul></DL></DD></DL><HR><A NAME="makeTransientShortArray(short, byte)"><!-- --></A><H3>makeTransientShortArray</H3><PRE>public static short[] <B>makeTransientShortArray</B>(short&nbsp;length,                                              byte&nbsp;event)                                       throws <A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A>,                                              <A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></PRE><DL><DD>Creates a transient short array with the specified array length.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of the short array<DD><CODE>event</CODE> - the <code>CLEAR_ON...</code> event which causes the array elements to be cleared<DT><B>Returns:</B><DD>the new transient short array<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A></CODE> - if the <CODE>length</CODE> parameter is negative<DD><CODE><A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></CODE> - with the following reason codes:<ul> <li><code>SystemException.ILLEGAL_VALUE</code> if event is not a valid event code. <li><code>SystemException.NO_TRANSIENT_SPACE</code> if sufficient transient space is not available. <li><code>SystemException.ILLEGAL_TRANSIENT</code> if the current applet context is not the currently selected applet context and <code>CLEAR_ON_DESELECT</code> is specified. </ul></DL></DD></DL><HR><A NAME="makeTransientObjectArray(short, byte)"><!-- --></A><H3>makeTransientObjectArray</H3><PRE>public static <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A>[] <B>makeTransientObjectArray</B>(short&nbsp;length,                                                byte&nbsp;event)                                         throws <A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A>,                                                <A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></PRE><DL><DD>Creates a transient array of <code>Object</code> with the specified array length.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of the <code>Object</code> array<DD><CODE>event</CODE> - the <code>CLEAR_ON...</code> event which causes the array elements to be cleared<DT><B>Returns:</B><DD>the new transient Object array<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/NegativeArraySizeException.html" title="class in java.lang">NegativeArraySizeException</A></CODE> - if the <CODE>length</CODE> parameter is negative<DD><CODE><A HREF="../../javacard/framework/SystemException.html" title="class in javacard.framework">SystemException</A></CODE> - with the following reason codes:<ul> <li><code>SystemException.ILLEGAL_VALUE</code> if event is not a valid event code. <li><code>SystemException.NO_TRANSIENT_SPACE</code> if sufficient transient space is not available. <li><code>SystemException.ILLEGAL_TRANSIENT</code> if the current applet context is not the currently selected applet context and <code>CLEAR_ON_DESELECT</code> is specified. </ul></DL></DD></DL><HR><A NAME="getVersion()"><!-- --></A><H3>getVersion</H3><PRE>public static short <B>getVersion</B>()</PRE><DL><DD>Returns the current major and minor version of the Java Card API.<P><DD><DL><DT><B>Returns:</B><DD>version number as byte.byte (major.minor)</DL></DD></DL><HR><A NAME="getAID()"><!-- --></A><H3>getAID</H3><PRE>public static <A HREF="../../javacard/framework/AID.html" title="class in javacard.framework">AID</A> <B>getAID</B>()</PRE><DL><DD>Returns the Java Card runtime environment-owned instance of the <code>AID</code> object associated with the current applet context, or <code>null</code> if the <code>Applet.register()</code> method has not yet been invoked. <p>Java Card runtime environment-owned instances of <code>AID</code> are permanent Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these permanent objects can be stored and re-used. <p>See <em>Runtime Environment Specification for the Java Card Platform</em>, section 6.2.1 for details.<P><DD><DL><DT><B>Returns:</B><DD>the <code>AID</code> object</DL></DD></DL><HR><A NAME="lookupAID(byte[], short, byte)"><!-- --></A><H3>lookupAID</H3><PRE>public static <A HREF="../../javacard/framework/AID.html" title="class in javacard.framework">AID</A> <B>lookupAID</B>(byte[]&nbsp;buffer,                            short&nbsp;offset,                            byte&nbsp;length)</PRE><DL><DD>Returns the Java Card runtime environment-owned instance of the <code>AID</code> object, if any, encapsulating the specified AID bytes in the <code>buffer</code> parameter if there exists a successfully installed applet on the card whose instance AID exactly matches that of the specified AID bytes. <p>Java Card runtime environment-owned instances of <code>AID</code> are permanent Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these permanent objects can be stored and re-used. <p>See <em>Runtime Environment Specification for the Java Card Platform</em>, section 6.2.1 for details.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - byte array containing the AID bytes<DD><CODE>offset</CODE> - offset within buffer where AID bytes begin<DD><CODE>length</CODE> - length of AID bytes in buffer<DT><B>Returns:</B><DD>the <code>AID</code> object, if any; <code>null</code> otherwise. A VM exception is thrown if <code>buffer</code> is <code>null</code>, or if <code>offset</code> or <code>length</code> are out of range.</DL></DD></DL><HR><A NAME="beginTransaction()"><!-- --></A><H3>beginTransaction</H3><PRE>public static void <B>beginTransaction</B>()                             throws <A HREF="../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></PRE><DL><DD>Begins an atomic transaction. If a transaction is already in progress (transaction nesting depth level != 0), a TransactionException is thrown. <p>Note:<ul> <li><em>This method may do nothing if the <code>Applet.register()</code> method has not yet been invoked. In case of tear or failure prior to successful registration, the Java Card runtime environment will roll back all atomically updated persistent state.</em> </ul><P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></CODE> - with the following reason codes:<ul> <li><code>TransactionException.IN_PROGRESS</code> if a transaction is already in progress.</ul><DT><B>See Also:</B><DD><A HREF="../../javacard/framework/JCSystem.html#commitTransaction()"><CODE>commitTransaction()</CODE></A>, <A HREF="../../javacard/framework/JCSystem.html#abortTransaction()"><CODE>abortTransaction()</CODE></A></DL></DD></DL><HR><A NAME="abortTransaction()"><!-- --></A><H3>abortTransaction</H3><PRE>public static void <B>abortTransaction</B>()                             throws <A HREF="../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></PRE><DL><DD>Aborts the atomic transaction. The contents of the commit buffer is discarded. <p>Note:<ul> <li><em>This method may do nothing if the <code>Applet.register()</code> method has not yet been invoked. In case of tear or failure prior to successful registration, the Java Card runtime environment will roll back all atomically updated persistent state.</em> <li><em>Do not call this method from within a transaction which creates new objects because the Java Card runtime environment may not recover the heap space used by the new object instances.</em> <li><em>Do not call this method from within a transaction which creates new objects because the Java Card runtime environment may, to ensure the security of the card and to avoid heap space loss, lock up the card session to force tear/reset processing.</em> <li><em>The Java Card runtime environment ensures that any variable of reference type which references an object instantiated from within this aborted transaction is equivalent to a </em><code>null</code><em> reference.</em> </ul><P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></CODE> - with the following reason codes:<ul> <li><code>TransactionException.NOT_IN_PROGRESS</code> if a transaction is not in progress.</ul><DT><B>See Also:</B><DD><A HREF="../../javacard/framework/JCSystem.html#beginTransaction()"><CODE>beginTransaction()</CODE></A>, <A HREF="../../javacard/framework/JCSystem.html#commitTransaction()"><CODE>commitTransaction()</CODE></A></DL></DD></DL><HR><A NAME="commitTransaction()"><!-- --></A><H3>commitTransaction</H3><PRE>public static void <B>commitTransaction</B>()                              throws <A HREF="../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></PRE><DL><DD>Commits an atomic transaction. The contents of commit buffer is atomically committed. If a transaction is not in progress (transaction nesting depth level == 0) then a TransactionException is thrown. <p>Note:<ul> <li><em>This method may do nothing if the <code>Applet.register()</code> method has not yet been invoked. In case of tear or failure prior to successful registration, the Java Card runtime environment will roll back all atomically updated persistent state.</em> </ul><P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javacard/framework/TransactionException.html" title="class in javacard.framework">TransactionException</A></CODE> - with the following reason codes:<ul> <li><code>TransactionException.NOT_IN_PROGRESS</code> if a transaction is not in progress.</ul><DT><B>See Also:</B><DD><A HREF="../../javacard/framework/JCSystem.html#beginTransaction()"><CODE>beginTransaction()</CODE></A>, <A HREF="../../javacard/framework/JCSystem.html#abortTransaction()"><CODE>abortTransaction()</CODE></A></DL></DD></DL><HR><A NAME="getTransactionDepth()"><!-- --></A><H3>getTransactionDepth</H3><PRE>public static byte <B>getTransactionDepth</B>()</PRE><DL><DD>Returns the current transaction nesting depth level. At present, only 1 transaction can be in progress at a time.<P><DD><DL><DT><B>Returns:</B><DD>1 if transaction in progress, 0 if not</DL></DD></DL><HR><A NAME="getUnusedCommitCapacity()"><!-- --></A><H3>getUnusedCommitCapacity</H3><PRE>public static short <B>getUnusedCommitCapacity</B>()</PRE><DL><DD>Returns the number of bytes left in the commit buffer. <p> Note:<ul> <li><em>If the number of bytes left in the commit buffer is greater than 32767, then this method returns 32767.</em> </ul><P><DD><DL><DT><B>Returns:</B><DD>the number of bytes left in the commit buffer<DT><B>See Also:</B><DD><A HREF="../../javacard/framework/JCSystem.html#getMaxCommitCapacity()"><CODE>getMaxCommitCapacity()</CODE></A></DL>

⌨️ 快捷键说明

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