📄 primitivebertlv.html
字号:
<BR> (Re-)Initializes <code>this</code> <CODE>PrimitiveBERTLV</CODE> object with the input tag, length and 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/PrimitiveBERTLV.html#replaceValue(byte[], short, short)">replaceValue</A></B>(byte[] vArray, short vOff, short vLen)</CODE><BR> Replaces the specified data in place of the current value of <code>this</code> Primitive BER TLV 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="../../../javacardx/framework/tlv/PrimitiveBERTLV.html#toBytes(byte[], short, byte[], short, short, byte[], short)">toBytes</A></B>(byte[] berTagArray, short berTagOff, byte[] valueArray, short vOff, short vLen, byte[] outBuf, short bOff)</CODE><BR> Writes a primitive TLV representation to the specified byte array using as input a Primitive BER tag representation in a byte array and a value representation in another byte array.</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="PrimitiveBERTLV(short)"><!-- --></A><H3>PrimitiveBERTLV</H3><PRE>public <B>PrimitiveBERTLV</B>(short numValueBytes)</PRE><DL><DD>Constructor creates an empty <CODE>PrimitiveBERTLV</CODE> object capable of encapsulating a Primitive BER TLV structure. <p>The initial capacity is specified by the numValueBytes argument.<P><DL><DT><B>Parameters:</B><DD><CODE>numValueBytes</CODE> - is the number of Value bytes 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 numValueBytes 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>PrimitiveBERTLV</CODE> using the input byte data. <p>If <code>this</code> primitive TLV object is empty, the initial capacity of <code>this</code> <CODE>PrimitiveBERTLV</CODE> is set to the byte length of the Value represented in the primitive TLV structure of the input 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.INSUFFICIENT_STORAGE</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 primitive BER TLV structure. </ul></DL></DD></DL><HR><A NAME="init(javacardx.framework.tlv.PrimitiveBERTag, byte[], short, short)"><!-- --></A><H3>init</H3><PRE>public short <B>init</B>(<A HREF="../../../javacardx/framework/tlv/PrimitiveBERTag.html" title="class in javacardx.framework.tlv">PrimitiveBERTag</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>PrimitiveBERTLV</CODE> object with the input tag, length and data. Note that a reference to the BER Tag object is retained by <code>this</code> object. A change in the BER Tag object contents affects <code>this</code> TLV instance. <p>If <code>this</code> primitive TLV object is empty, the initial capacity of <code>this</code> <CODE>PrimitiveBERTLV</CODE> is set to the value of the vLen argument. <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 <CODE>BERTag</CODE> object<DD><CODE>vArray</CODE> - the byte array containing length bytes of TLV value<DD><CODE>vOff</CODE> - offset within the <CODE>vArray</CODE> byte array where data begins<DD><CODE>vLen</CODE> - byte length of the value data in <CODE>vArray</CODE><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> parameter 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. </ul></DL></DD></DL><HR><A NAME="appendValue(byte[], short, short)"><!-- --></A><H3>appendValue</H3><PRE>public short <B>appendValue</B>(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>Appends the specified data to the end of <code>this</code> Primitive BER TLV object. <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>vArray</CODE> - the byte array containing length bytes of TLV value<DD><CODE>vOff</CODE> - offset within the <CODE>vArray</CODE> byte array where data begins<DD><CODE>vLen</CODE> - the byte length of the value in the input <CODE>vArray</CODE><DT><B>Returns:</B><DD>the resulting size of <code>this</code> 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 length parameter is negative<DD><CODE><A HREF="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <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> if the required capacity is not available and the implementation does not support automatic expansion <li><code>TLVException.EMPTY_TLV</code> if <code>this</code> <CODE>PrimitiveBERTLV</CODE> object is empty. </ul></DL></DD></DL><HR><A NAME="replaceValue(byte[], short, short)"><!-- --></A><H3>replaceValue</H3><PRE>public short <B>replaceValue</B>(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>Replaces the specified data in place of the current value of <code>this</code> Primitive BER TLV object. <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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -