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 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 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 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 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> 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 offset, boolean 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 offset, int 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 offset, char 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 offset, long 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 offset, <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> 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 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 index, char 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 start, int 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 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>'