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

📄 bertag.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<DT><B>Returns:</B><DD>the BER Tag tag number<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.TAG_NUMBER_GREATER_THAN_32767</code> if the tag number is > 32767. <li><code>TLVException.EMPTY_TAG</code> if the BER Tag is empty. </ul></DL></DD></DL><HR><A NAME="isConstructed()"><!-- --></A><H3>isConstructed</H3><PRE>public boolean <B>isConstructed</B>()</PRE><DL><DD>Used to query if <code>this</code> BER tag structure is constructed<P><DD><DL><DT><B>Returns:</B><DD><CODE>true</CODE> if constructed, <CODE>false</CODE> if primitive<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.EMPTY_TAG</code> if the BER Tag is empty. </ul></DL></DD></DL><HR><A NAME="tagClass()"><!-- --></A><H3>tagClass</H3><PRE>public byte <B>tagClass</B>()</PRE><DL><DD>Returns the tag class part of <code>this</code> BER Tag structure<P><DD><DL><DT><B>Returns:</B><DD>the BER Tag class. One of the <CODE>BER_TAG_CLASS_MASK_*</CODE>.. constants defined above. See <A HREF="../../../javacardx/framework/tlv/BERTag.html#BER_TAG_CLASS_MASK_APPLICATION"><CODE>BER_TAG_CLASS_MASK_APPLICATION</CODE></A>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.EMPTY_TAG</code> if the BER Tag is empty. </ul></DL></DD></DL><HR><A NAME="equals(javacardx.framework.tlv.BERTag)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../javacardx/framework/tlv/BERTag.html" title="class in javacardx.framework.tlv">BERTag</A>&nbsp;otherTag)</PRE><DL><DD>Compares <code>this</code> BER Tag with another. Note that this method does not throw exceptions. If the parameter <CODE>otherTag</CODE> is <CODE>null</CODE>, the method returns <CODE>false</CODE><P><DD><DL><DT><B>Returns:</B><DD><CODE>true</CODE> if the tag data encapsulated are equal, <CODE>false</CODE> otherwise</DL></DD></DL><HR><A NAME="toBytes(short, boolean, short, byte[], short)"><!-- --></A><H3>toBytes</H3><PRE>public static short <B>toBytes</B>(short&nbsp;tagClass,                            boolean&nbsp;isConstructed,                            short&nbsp;tagNumber,                            byte[]&nbsp;outArray,                            short&nbsp;bOff)</PRE><DL><DD>Writes the BER Tag bytes representing the specified tag class, constructed flag and the tag number as a BER Tag representation in the specified byte array<P><DD><DL><DT><B>Parameters:</B><DD><CODE>tagClass</CODE> - encodes the tag class. Valid codes are the <CODE>BER_TAG_CLASS_MASK_*</CODE> constants defined above. See <A HREF="../../../javacardx/framework/tlv/BERTag.html#BER_TAG_CLASS_MASK_APPLICATION"><CODE>BER_TAG_CLASS_MASK_APPLICATION</CODE></A>.<DD><CODE>isConstructed</CODE> - true if the tag is constructed, false if primitive<DD><CODE>tagNumber</CODE> - is the tag number.<DD><CODE>outArray</CODE> - output byte array<DD><CODE>bOff</CODE> - offset within byte array containing first byte<DT><B>Returns:</B><DD>size of BER Tag output bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html" title="class in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if accessing the output array would cause access of data outside array bounds, or if the array offset parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>outArray</code> is <code>null</code><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.ILLEGAL_SIZE</code> if the tag size is larger than the supported maximum size or 32767 <li><code>TLVException.INVALID_PARAM</code> if <code>tagClass</code> parameter is invalid or if the <code>tagNumber</code> parameter is negative </ul></DL></DD></DL><HR><A NAME="size(byte[], short)"><!-- --></A><H3>size</H3><PRE>public static byte <B>size</B>(byte[]&nbsp;berTagArray,                        short&nbsp;bOff)                 throws <A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></PRE><DL><DD>Returns the byte size required to represent the BER Tag from its representation in the specified byte array<P><DD><DL><DT><B>Parameters:</B><DD><CODE>berTagArray</CODE> - input byte array containing the BER Tag representation<DD><CODE>bOff</CODE> - offset within byte array containing first byte<DT><B>Returns:</B><DD>size of BER Tag in bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html" title="class in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>berTagArray</code> is <code>null</code><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.ILLEGAL_SIZE</code> if the size of the BER Tag is greater than the maximum Tag size supported <li><code>TLVException.TAG_SIZE_GREATER_THAN_127</code> if the size of the BER Tag is > 127. <li><code>TLVException.MALFORMED_TAG</code> if tag representation in the byte array is malformed </ul></DL></DD></DL><HR><A NAME="tagNumber(byte[], short)"><!-- --></A><H3>tagNumber</H3><PRE>public static short <B>tagNumber</B>(byte[]&nbsp;berTagArray,                              short&nbsp;bOff)                       throws <A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></PRE><DL><DD>Returns the tag number part of the BER Tag from its representation in the specified byte array<P><DD><DL><DT><B>Parameters:</B><DD><CODE>berTagArray</CODE> - input byte array<DD><CODE>bOff</CODE> - offset within byte array containing first byte<DT><B>Returns:</B><DD>the BER Tag tag number<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html" title="class in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>berTagArray</code> is <code>null</code><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.ILLEGAL_SIZE</code> if the size of the BER Tag is greater than the maximum Tag size supported <li><code>TLVException.TAG_NUMBER_GREATER_THAN_32767</code> if the tag number is > 32767. <li><code>TLVException.MALFORMED_TAG</code> if tag representation in the byte array is malformed. </ul></DL></DD></DL><HR><A NAME="isConstructed(byte[], short)"><!-- --></A><H3>isConstructed</H3><PRE>public static boolean <B>isConstructed</B>(byte[]&nbsp;berTagArray,                                    short&nbsp;bOff)</PRE><DL><DD>Returns the constructed flag part of the BER Tag from its representation in the specified byte array<P><DD><DL><DT><B>Parameters:</B><DD><CODE>berTagArray</CODE> - input byte array<DD><CODE>bOff</CODE> - offset within byte array containing first byte<DT><B>Returns:</B><DD><CODE>true</CODE> if constructed, <CODE>false</CODE> if primitive<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html" title="class in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>berTagArray</code> is <code>null</code><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.MALFORMED_TAG</code> if tag representation in the byte array is malformed. </ul></DL></DD></DL><HR><A NAME="tagClass(byte[], short)"><!-- --></A><H3>tagClass</H3><PRE>public static byte <B>tagClass</B>(byte[]&nbsp;berTagArray,                            short&nbsp;bOff)</PRE><DL><DD>Returns the tag class part of the BER Tag from its representation in the specified byte array<P><DD><DL><DT><B>Parameters:</B><DD><CODE>berTagArray</CODE> - input byte array<DD><CODE>bOff</CODE> - offset within byte array containing first byte<DT><B>Returns:</B><DD>the BER Tag class. One of the <CODE>BER_TAG_CLASS_MASK_*</CODE>.. constants defined above. See <A HREF="../../../javacardx/framework/tlv/BERTag.html#BER_TAG_CLASS_MASK_APPLICATION"><CODE>BER_TAG_CLASS_MASK_APPLICATION</CODE></A>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html" title="class in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>berTagArray</code> is <code>null</code><DD><CODE><A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></CODE> - with the following reason codes:<ul> <li><code>TLVException.MALFORMED_TAG</code> if tag representation in the byte array is malformed. </ul></DL></DD></DL><HR><A NAME="verifyFormat(byte[], short)"><!-- --></A><H3>verifyFormat</H3><PRE>public static boolean <B>verifyFormat</B>(byte[]&nbsp;berTagArray,                                   short&nbsp;bOff)</PRE><DL><DD>Checks if the input data is a well-formed BER Tag representation<P><DD><DL><DT><B>Parameters:</B><DD><CODE>berTagArray</CODE> - input byte array<DD><CODE>bOff</CODE> - offset within byte array containing first byte<DT><B>Returns:</B><DD><CODE>true</CODE> if input data is a well formed BER Tag structure of tag size equal to or less than the supported maximum size, <CODE>false</CODE> otherwise<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html" title="class in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if accessing the input array would cause access of data outside array bounds, or if the array offset parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>berTagArray</code> is <code>null</code></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/BERTag.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="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javacardx/framework/tlv/BERTag.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="BERTag.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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 + -