📄 primitivebertlv.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_02) on Wed Mar 22 19:19:14 PST 2006 --><TITLE>PrimitiveBERTLV (Java Card API and Subsets)</TITLE><META NAME="keywords" CONTENT="javacardx.framework.tlv.PrimitiveBERTLV class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PrimitiveBERTLV (Java Card API and Subsets)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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/PrimitiveBERTLV.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/framework/tlv/PrimitiveBERTag.html" title="class in javacardx.framework.tlv"><B>PREV CLASS</B></A> <A HREF="../../../javacardx/framework/tlv/TLVException.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/PrimitiveBERTLV.html" target="_top"><B>FRAMES</B></A> <A HREF="PrimitiveBERTLV.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javacardx.framework.tlv</FONT><BR>Class PrimitiveBERTLV</H2><PRE><A HREF="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">javacardx.framework.tlv.BERTLV</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javacardx.framework.tlv.PrimitiveBERTLV</B></PRE><HR><DL><DT><PRE>public class <B>PrimitiveBERTLV</B><DT>extends <A HREF="../../../javacardx/framework/tlv/BERTLV.html" title="class in javacardx.framework.tlv">BERTLV</A></DL></PRE><P>The <code>PrimitiveBERTLV</code> class encapsulates a primitive BER TLV structure. It extends the generic <CODE>BERTLV</CODE> class. The rules on the allowed encoding of the Tag, length and value fields is based on the ASN.1 BER encoding rules ISO/IEC 8825-1:2002. <p> The <CODE>PrimitiveBERTLV</CODE> class only supports encoding of the length(L) octets in definite form. The value(V) field which encodes the contents octets are merely viewed as a series of bytes. <p>Every <CODE>PrimitiveBERTLV</CODE> has a capacity which represents the allocated internal buffer to represent the Value of <code>this</code> TLV object. As long as the number of bytes required to represent the Value of the TLV object does not exceed the capacity, it is not necessary to allocate additional internal buffer space. If the internal buffer overflows, and the implementation supports automatic expansion which might require new data allocation and possibly old data/object deletion, it is automatically made larger. Otherwise a <CODE>TLVException</CODE> is thrown. <p> The <CODE>BERTLV</CODE> class and the subclasses <CODE>ConstructedBERTLV</CODE> and <CODE>PrimitiveBERTLV</CODE>, also provide static methods to parse or edit a TLV structure representation in a byte array.<P><P><DL><DT><B>Since:</B></DT> <DD>2.2.2</DD></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javacardx/framework/tlv/PrimitiveBERTLV.html#PrimitiveBERTLV(short)">PrimitiveBERTLV</A></B>(short numValueBytes)</CODE><BR> Constructor creates an empty <CODE>PrimitiveBERTLV</CODE> object capable of encapsulating a Primitive BER TLV structure.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></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#appendValue(byte[], short, byte[], short, short)">appendValue</A></B>(byte[] berTLVArray, short bTLVOff, byte[] vArray, short vOff, short vLen)</CODE><BR> Appends the specified data to the end of the Primitive TLV representation in the specified byte array.</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#appendValue(byte[], short, short)">appendValue</A></B>(byte[] vArray, short vOff, short vLen)</CODE><BR> Appends the specified data to the end 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> short</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javacardx/framework/tlv/PrimitiveBERTLV.html#getValue(byte[], short)">getValue</A></B>(byte[] tlvValue, short tOff)</CODE><BR> Writes the value (V) part of <code>this</code> Primitive BER TLV object into the output buffer.</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#getValueOffset(byte[], short)">getValueOffset</A></B>(byte[] berTLVArray, short bTLVOff)</CODE><BR> Returns the offset into the specified input byte array of the value (V) part of the BER TLV structure representation in the input array.</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#init(byte[], short, short)">init</A></B>(byte[] bArray, short bOff, short bLen)</CODE><BR> (Re-)Initializes <code>this</code> <CODE>PrimitiveBERTLV</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/PrimitiveBERTLV.html#init(javacardx.framework.tlv.PrimitiveBERTag, byte[], short, short)">init</A></B>(<A HREF="../../../javacardx/framework/tlv/PrimitiveBERTag.html" title="class in javacardx.framework.tlv">PrimitiveBERTag</A> tag, byte[] vArray, short vOff, short vLen)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -