📄 constructedbertlv.html
字号:
<CODE> short</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javacardx/framework/tlv/ConstructedBERTLV.html#init(byte[], short, short)">init</A></B>(byte[] bArray, short bOff, short bLen)</CODE><BR> (Re-)Initializes <code>this</code> <CODE>ConstructedBERTLV</CODE> using the input byte data.</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="../../../javacardx/framework/tlv/ConstructedBERTLV.html#init(javacardx.framework.tlv.ConstructedBERTag, javacardx.framework.tlv.BERTLV)">init</A></B>(<A HREF="../../../javacardx/framework/tlv/ConstructedBERTag.html" title="class in javacardx.framework.tlv">ConstructedBERTag</A> tag, <A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">BERTLV</A> aTLV)</CODE><BR> (Re-)Initializes <code>this</code> <CODE>ConstructedBERTLV</CODE> object with the input tag and TLV parameter.</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="../../../javacardx/framework/tlv/ConstructedBERTLV.html#init(javacardx.framework.tlv.ConstructedBERTag, byte[], short, short)">init</A></B>(<A HREF="../../../javacardx/framework/tlv/ConstructedBERTag.html" title="class in javacardx.framework.tlv">ConstructedBERTag</A> tag, byte[] vArray, short vOff, short vLen)</CODE><BR> (Re-)Initializes <code>this</code> <CODE>ConstructedBERTLV</CODE> object with the input tag and specified data as value of the object.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javacardx.framework.tlv.BERTLV"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class javacardx.framework.tlv.<A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">BERTLV</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javacardx/framework/tlv/BERTLV.html#getInstance(byte[], short, short)">getInstance</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#getLength()">getLength</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#getLength(byte[], short)">getLength</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#getTag()">getTag</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#getTag(byte[], short, byte[], short)">getTag</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#size()">size</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#toBytes(byte[], short)">toBytes</A>, <A HREF="../../../javacardx/framework/tlv/BERTLV.html#verifyFormat(byte[], short, short)">verifyFormat</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ConstructedBERTLV(short)"><!-- --></A><H3>ConstructedBERTLV</H3><PRE>public <B>ConstructedBERTLV</B>(short numTLVs)</PRE><DL><DD>Constructor creates an empty <CODE>ConstructedBERTLV</CODE> object capable of encapsulating a <CODE>ConstructedBERTLV</CODE> structure. <p>The initial capacity is specified by the numTLVs argument.<P><DL><DT><B>Parameters:</B><DD><CODE>numTLVs</CODE> - is the number of contained TLVs to allocate<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.INVALID_PARAM</code> if numTLVs parameter is negative or larger than the maximum capacity supported by the implementation. </ul></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="init(byte[], short, short)"><!-- --></A><H3>init</H3><PRE>public short <B>init</B>(byte[] bArray, short bOff, short bLen) throws <A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></PRE><DL><DD>(Re-)Initializes <code>this</code> <CODE>ConstructedBERTLV</CODE> using the input byte data. <p>If <code>this</code> <CODE>ConstructedBERTLV</CODE> is not empty, internal references to the previously contained BER TLV objects is removed. <p> Each contained <CODE>BERTLV</CODE> is constructed and initialized using this init method. The initial capacity of each of the contained <CODE>ConstructedBERTLV</CODE> objects is set to the number of TLVs contained at the top level of that TLV structure in the byte array. <p> Note:<ul> <li><em>If </em><code>bOff+bLen</code><em> is greater than </em><code>bArray.length</code><em>, the length of the </em><code>bArray</code><em> array, an </em><code>ArrayIndexOutOfBoundsException</code><em> exception is thrown.</em> </ul><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javacardx/framework/tlv/BERTLV.html#init(byte[], short, short)">init</A></CODE> in class <CODE><A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">BERTLV</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>bArray</CODE> - input byte array<DD><CODE>bOff</CODE> - offset within byte array containing the tlv data<DD><CODE>bLen</CODE> - byte length of input data<DT><B>Returns:</B><DD>the resulting size of <code>this</code> TLV if represented 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 or array length parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>bArray</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 required capacity is not available and the implementation does not support automatic expansion. <li><code>TLVException.MALFORMED_TLV</code> if the input data is not a well-formed constructed BER TLV structure. </ul></DL></DD></DL><HR><A NAME="init(javacardx.framework.tlv.ConstructedBERTag, javacardx.framework.tlv.BERTLV)"><!-- --></A><H3>init</H3><PRE>public short <B>init</B>(<A HREF="../../../javacardx/framework/tlv/ConstructedBERTag.html" title="class in javacardx.framework.tlv">ConstructedBERTag</A> tag, <A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">BERTLV</A> aTLV) throws <A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></PRE><DL><DD>(Re-)Initializes <code>this</code> <CODE>ConstructedBERTLV</CODE> object with the input tag and TLV parameter. Note that a reference to the BER Tag object parameter is retained by <code>this</code> object. If the input BER Tag object is modified, the TLV structure encapsulated by <code>this</code> TLV instance is also modified. Similarly, a reference to the BER TLV object parameter is also retained by <code>this</code> object. If the input BER TLV object is modified, the TLV structure encapsulated by <code>this</code> TLV instance is also modified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>tag</CODE> - a <CODE>BERTag</CODE> object<DD><CODE>aTLV</CODE> - to use to initialize as the value of <code>this</code> TLV<DT><B>Returns:</B><DD>the resulting size of <code>this</code> TLV if represented in bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if either <code>tag</code> or <code>aTLV</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.INSUFFICIENT_STORAGE</code> if the required capacity is not available and the implementation does not support automatic expansion <li><code>TLVException.INVALID_PARAM</code> if <code>aTLV</code> is <code>this</code> or <code>this</code> TLV object is contained in any of the constructed TLV objects in the hierarchy of the <code>aTLV</code> object. </ul></DL></DD></DL><HR><A NAME="init(javacardx.framework.tlv.ConstructedBERTag, byte[], short, short)"><!-- --></A><H3>init</H3><PRE>public short <B>init</B>(<A HREF="../../../javacardx/framework/tlv/ConstructedBERTag.html" title="class in javacardx.framework.tlv">ConstructedBERTag</A> tag, byte[] vArray, short vOff, short vLen) throws <A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></PRE><DL><DD>(Re-)Initializes <code>this</code> <CODE>ConstructedBERTLV</CODE> object with the input tag and specified data as value of the object. Note that a reference to the BER Tag object is retained by <code>this</code> object. If the input BER Tag object is modified, the TLV structure encapsulated by <code>this</code> TLV instance is also modified. <p> Each contained <CODE>BERTLV</CODE> is constructed and initialized using this init method. The initial capacity of each of the contained <CODE>ConstructedBERTLV</CODE> objects is set to the number of TLVs contained at the top level of that TLV structure in the byte array. <p> Note:<ul> <li><em>If </em><code>vOff+vLen</code><em> is greater than </em><code>vArray.length</code><em>, the length of the </em><code>vArray</code><em> array, an </em><code>ArrayIndexOutOfBoundsException</code><em> exception is thrown.</em> </ul><P><DD><DL><DT><B>Parameters:</B><DD><CODE>tag</CODE> - a BERTag object<DD><CODE>vArray</CODE> - the byte array containing <code>vLen</code> bytes of TLV Value<DD><CODE>vOff</CODE> - offset within the vArray byte array where data begins<DD><CODE>vLen</CODE> - byte length of the value data in vArray<DT><B>Returns:</B><DD>the resulting size of <code>this</code> TLV if represented 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 or array length parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if either <code>tag</code> or <code>vArray</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.INSUFFICIENT_STORAGE</code> or if the required capacity is not available and the implementation does not support automatic expansion. </ul></DL></DD></DL><HR><A NAME="append(javacardx.framework.tlv.BERTLV)"><!-- --></A><H3>append</H3><PRE>public short <B>append</B>(<A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">BERTLV</A> aTLV) throws <A HREF="../../../javacardx/framework/tlv/TLVException.html" title="class in javacardx.framework.tlv">TLVException</A></PRE><DL><DD>Append the specified TLV to the end of <CODE>ConstructedBERTLV</CODE>. Note that a reference to the BER TLV object parameter is retained by <code>this</code> object. A change in the BER TLV object contents affects <code>this</code> TLV instance.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aTLV</CODE> - a BER TLV object<DT><B>Returns:</B><DD>the resulting size of <code>this</code> TLV if represented in bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>aTLV</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.INSUFFICIENT_STORAGE</code> if the required capacity is not available and the implementation does not support automatic expansion. <li><code>TLVException.INVALID_PARAM</code> if <code>aTLV</code> is <code>this</code> or <code>this</code> TLV object is contained in any of the constructed TLV objects in the hierarchy of the <code>aTLV</code> object. </ul></DL></DD></DL><HR><A NAME="delete(javacardx.framework.tlv.BERTLV, short)"><!-- --></A><H3>delete</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -