📄 memory.html
字号:
<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="MEMORY_TYPE_MIFARE"><!-- --></A><H3>MEMORY_TYPE_MIFARE</H3><PRE>public static final byte <B>MEMORY_TYPE_MIFARE</B></PRE><DL><DD>MIFARE<sup>TM</sup> memory type constant. When a <CODE>MemoryAccess</CODE> instance of this type is requested, the <CODE>memorySize</CODE> and <CODE>memorySizeOffset</CODE> parameters are ignored.<p> To use the <CODE>MemoryAccess</CODE> instance the following parameters are applicable : <ul> <li><em>auth_key is an 8 byte password, other_len <=16</em> <li><em>other_sector = 0, 0<= other_block <= 63</em> <li><em>other_block = (%4==3) returns 0 on readData</em> <li><em>other_block = 0 returns false on writeData</em> </ul><P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javacardx.external.Memory.MEMORY_TYPE_MIFARE">Constant Field Values</A></DL></DL><HR><A NAME="MEMORY_TYPE_EXTENDED_STORE"><!-- --></A><H3>MEMORY_TYPE_EXTENDED_STORE</H3><PRE>public static final byte <B>MEMORY_TYPE_EXTENDED_STORE</B></PRE><DL><DD>Extended Memory Store type constant. When a <CODE>MemoryAccess</CODE> instance of this type is requested, the <CODE>memorySize</CODE> parameter contains the 32 bit number representing the size in bytes of the memory access required and must be a positive number less than or equal to <CODE>2,147,483,647 (2^31 - 1)</CODE>.<p> <p>To use the <CODE>MemoryAccess</CODE> instance the following parameters are applicable. <ul> <li><em>auth_key parameter is not required; it is ignored</em> <li><em>other_len <= 32767</em> <li><em>(other_sector, other_block) concatenated is a 32 bit address</em> </ul> <p>Note. <ul><li><em> To ensure optimal performance on all mass storage memory types when accessing different areas of memory, use monotonically increasing addresses.</em> <li><em>Each time the </em><code>getMemoryAccessInstance</code><em> method is called with this memory type parameter, a new memory access object to access a distinct memory chunk is returned. A previously obtained memory access object cannot be used to access the memory chunk obtained via this new memory access object. The new memory access object cannot be used to access the memory chuck accessible via any previously allocated memory access object.</em> </ul><P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#javacardx.external.Memory.MEMORY_TYPE_EXTENDED_STORE">Constant Field Values</A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getMemoryAccessInstance(byte, short[], short)"><!-- --></A><H3>getMemoryAccessInstance</H3><PRE>public static final <A HREF="../../javacardx/external/MemoryAccess.html" title="interface in javacardx.external">MemoryAccess</A> <B>getMemoryAccessInstance</B>(byte memoryType, short[] memorySize, short memorySizeOffset) throws <A HREF="../../javacardx/external/ExternalException.html" title="class in javacardx.external">ExternalException</A></PRE><DL><DD>Creates a <code>MemoryAccess</code> object instance for the selected memory subsystem.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>memoryType</CODE> - the desired external memory subsystem. Valid codes listed in <CODE>MEMORY_TYPE_*</CODE> constants above, for example <A HREF="../../javacardx/external/Memory.html#MEMORY_TYPE_MIFARE"><CODE>MEMORY_TYPE_MIFARE</CODE></A>.<DD><CODE>memorySize</CODE> - the array containing the desired size in bytes, if applicable, in the external memory subsystem. Check the descriptions of the MEMORY_TYPE_* constants above for more details. The 32 bit number representing the memory size in bytes is formed by concatenating the two short values at offset <CODE>memorySizeOffset</CODE> (most significant 16 bits) and <CODE>memorySizeOffset+1</CODE> (least significant 16 bits) in this array<DD><CODE>memorySizeOffset</CODE> - the offset within the <CODE>memorySize</CODE> array where the 32 bit memory size number in bytes is specified<DT><B>Returns:</B><DD>the <code>MemoryAccess</code> object instance of the requested memory subsystem<DT><B>Throws:</B><DD><CODE><A HREF="../../javacardx/external/ExternalException.html" title="class in javacardx.external">ExternalException</A></CODE> - with the following reason codes:<ul> <li><code>ExternalException.NO_SUCH_SUBSYSTEM</code> if the requested memory subsystem is not available. <li><code>ExternalException.INVALID_PARAM</code> if the <CODE>memorySize</CODE> parameter is invalid.</ul></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Memory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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"> <A HREF="../../javacardx/external/ExternalException.html" title="class in javacardx.external"><B>PREV CLASS</B></A> <A HREF="../../javacardx/external/MemoryAccess.html" title="interface in javacardx.external"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javacardx/external/Memory.html" target="_top"><B>FRAMES</B></A> <A HREF="Memory.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 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 + -