buffer.html

来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 705 行 · 第 1/2 页

HTML
705
字号
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="append(boolean)"><!-- --></A><H3>append</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>append</B>(boolean&nbsp;b)</PRE><DL><DD>Appends the string representation of the <code>boolean</code>  argument to the string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - a <code>boolean</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code>.</DL></DD></DL><HR><A NAME="append(int)"><!-- --></A><H3>append</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>append</B>(int&nbsp;i)</PRE><DL><DD>Appends the string representation of the <code>int</code>  argument to this string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - an <code>int</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="append(char)"><!-- --></A><H3>append</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>append</B>(char&nbsp;c)</PRE><DL><DD>Appends the specified <code>char</code>  argument to this string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - an <code>char</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="append(long)"><!-- --></A><H3>append</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>append</B>(long&nbsp;l)</PRE><DL><DD>Appends the string representation of the <code>long</code>  argument to this string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - a <code>long</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="append(Object)"><!-- --></A><H3>append</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>append</B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;obj)</PRE><DL><DD>Appends the string representation of the <code>Object</code>  argument to this string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - an <code>Object</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="insert(int, boolean)"><!-- --></A><H3>insert</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>insert</B>(int&nbsp;offset,                     boolean&nbsp;b)</PRE><DL><DD>Inserts the string representation of the <code>boolean</code>  argument into this string buffer.  <p> The offset argument must be greater than or equal to  <code>0</code>, and less than or equal to the length of this  string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset.<DD><CODE>b</CODE> - a <code>boolean</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="insert(int, int)"><!-- --></A><H3>insert</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>insert</B>(int&nbsp;offset,                     int&nbsp;i)</PRE><DL><DD>Inserts the string representation of the second <code>int</code>  argument into this string buffer.  <p> The offset argument must be greater than or equal to  <code>0</code>, and less than or equal to the length of this  string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset.<DD><CODE>i</CODE> - an <code>int</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="insert(int, char)"><!-- --></A><H3>insert</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>insert</B>(int&nbsp;offset,                     char&nbsp;c)</PRE><DL><DD>Inserts the second <code>char</code>  argument into this string buffer.  <p> The offset argument must be greater than or equal to  <code>0</code>, and less than or equal to the length of this  string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset.<DD><CODE>c</CODE> - an <code>char</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="insert(int, long)"><!-- --></A><H3>insert</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>insert</B>(int&nbsp;offset,                     long&nbsp;l)</PRE><DL><DD>Inserts the string representation of the <code>long</code>  argument into this string buffer.  <p> The offset argument must be greater than or equal to  <code>0</code>, and less than or equal to the length of this  string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset.<DD><CODE>l</CODE> - a <code>long</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="insert(int, Object)"><!-- --></A><H3>insert</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>insert</B>(int&nbsp;offset,                     <A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;obj)</PRE><DL><DD>Inserts the string representation of the <code>Object</code>  argument into this string buffer.  <p> The offset argument must be greater than or equal to  <code>0</code>, and less than or equal to the length of this  string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset.<DD><CODE>obj</CODE> - an <code>Object</code>.<DT><B>Returns:</B><DD>a reference to this <code>Buffer</code> object.</DL></DD></DL><HR><A NAME="operator_get(int)"><!-- --></A><H3>operator_get</H3><PRE>       char <B>operator_get</B>(int&nbsp;index)</PRE><DL><DD>The specified character of the sequence currently represented by  the string buffer, as indicated by the <code>index</code> argument,  is returned. The first character of a string buffer is at index  <code>0</code>, the next at index <code>1</code>, and so on, for  array indexing.  <p> The index argument must be greater than or equal to  <code>0</code>, and less than the length of this string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired character.<DT><B>Returns:</B><DD>the character at the specified index of this string buffer.<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Buffer.html#length()"><CODE>length()</CODE></A>, <a href="package-summary.html#operator_get">get</a></DL></DD></DL><HR><A NAME="operator_set(int, char)"><!-- --></A><H3>operator_set</H3><PRE>       char <B>operator_set</B>(int&nbsp;index,                         char&nbsp;ch)</PRE><DL><DD>The character at the specified index of this string buffer is set  to <code>ch</code>. The string buffer is altered to represent a new  character sequence that is identical to the old character sequence,  except that it contains the character <code>ch</code> at position  <code>index</code>.  <p> The offset argument must be greater than or equal to  <code>0</code>, and less than the length of this string buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the character to modify.<DD><CODE>ch</CODE> - the new character.<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Buffer.html#length()"><CODE>length()</CODE></A>, <a href="package-summary.html#operator_set">set</a></DL></DD></DL><HR><A NAME="delete(int, int)"><!-- --></A><H3>delete</H3><PRE>       <A HREF="../../widsets/api/Buffer.html" title="class in ">Buffer</A> <B>delete</B>(int&nbsp;start,                     int&nbsp;end)</PRE><DL><DD>Removes the characters in a substring of this <code>Buffer</code>. The substring begins at the specified <code>start</code> and extends to the character at index <code>end - 1</code> or to the end of the <code>Buffer</code> if no such character exists. If <code>start</code> is equal to <code>end</code>, no changes are made.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>start</CODE> - The beginning index, inclusive.<DD><CODE>end</CODE> - The ending index, exclusive.<DT><B>Returns:</B><DD>This string buffer.</DL></DD></DL><HR><A NAME="length()"><!-- --></A><H3>length</H3><PRE>       int <B>length</B>()</PRE><DL><DD>Returns the length (character count) of this string buffer.<P><DD><DL><DT><B>Returns:</B><DD>the length of the sequence of characters currently           represented by this string buffer.</DL></DD></DL><HR><A NAME="setLength(int)"><!-- --></A><H3>setLength</H3><PRE>       void <B>setLength</B>(int&nbsp;newLength)</PRE><DL><DD>Sets the length of this String buffer. This string buffer is altered to represent a new character sequence  whose length is specified by the argument. For every nonnegative  index <i>k</i> less than <code>newLength</code>, the character at  index <i>k</i> in the new character sequence is the same as the  character at index <i>k</i> in the old sequence if <i>k</i> is less  than the length of the old character sequence; otherwise, it is the  null character <code>''</code>.    In other words, if the <code>newLength</code> argument is less than  the current length of the string buffer, the string buffer is  truncated to contain exactly the number of characters given by the  <code>newLength</code> argument.  <p> If the <code>newLength</code> argument is greater than or equal  to the current length, sufficient null characters  (<code>'&#92;u0000'</code>) are appended to the string buffer so that  length becomes the <code>newLength</code> argument.  <p> The <code>newLength</code> argument must be greater than or equal  to <code>0</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>newLength</CODE> - the new length of the buffer.<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Buffer.html#length()"><CODE>length()</CODE></A></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="../../widsets/api/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="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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../widsets/api/API.html" title="class in "><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../widsets/api/ByteArray.html" title="class in "><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?widsets/api/Buffer.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Buffer.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;FIELD&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;FIELD&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></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?