#include <java_lang_StringBuffer.h>
Inheritance diagram for java::lang::StringBuffer:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::StringBuffer > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::StringBuffer > > | array2D |
Public Member Functions | |
| ::java::lang::StringBuffer | _delete (jint start, jint end,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Removes the characters in a substring of this StringBuffer. | |
| ::java::lang::StringBuffer | append (const ::xmog_java_char_array &str, jint offset, jint len,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of a subarray of the char array argument to this string buffer. | |
| ::java::lang::StringBuffer | append (const ::xmog_java_char_array &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the char array argument to this string buffer. | |
| ::java::lang::StringBuffer | append (const ::java::lang::StringBuffer &sb,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the specified StringBuffer to this StringBuffer. | |
| ::java::lang::StringBuffer | append (const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Appends the string to this string buffer. | |
| ::java::lang::StringBuffer | append (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the Object argument to this string buffer. | |
| ::java::lang::StringBuffer | append (jdouble d,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the double argument to this string buffer. | |
| ::java::lang::StringBuffer | append (jfloat f,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the float argument to this string buffer. | |
| ::java::lang::StringBuffer | append (jchar c,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the char argument to this string buffer. | |
| ::java::lang::StringBuffer | append (jlong l,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the long argument to this string buffer. | |
| ::java::lang::StringBuffer | append (jint i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the int argument to this string buffer. | |
| ::java::lang::StringBuffer | append (bool b,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Appends the string representation of the boolean argument to the string buffer. | |
| jint | capacity (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the current capacity of the String buffer. | |
| jchar | charAt (jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
The specified character of the sequence currently represented by the string buffer, as indicated by the index argument, is returned. | |
| ::java::lang::StringBuffer | deleteCharAt (jint index,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character). | |
| void | ensureCapacity (jint minimumCapacity,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Ensures that the capacity of the buffer is at least equal to the specified minimum. | |
| void | getChars (jint srcBegin, jint srcEnd, const ::xmog_java_char_array &dst, jint dstBegin,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Characters are copied from this string buffer into the destination character array dst. | |
| jint | indexOf (const ::java::lang::String &str, jint fromIndex,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. | |
| jint | indexOf (const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the index within this string of the first occurrence of the specified substring. | |
| ::java::lang::StringBuffer | insert (jint index, const ::xmog_java_char_array &str, jint offset, jint len,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of a subarray of the str array argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, const ::xmog_java_char_array &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the char array argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Inserts the string into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the Object argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, jdouble d,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the double argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, jfloat f,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the float argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, jlong l,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the long argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, jchar c,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the char argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, bool b,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the boolean argument into this string buffer. | |
| ::java::lang::StringBuffer | insert (jint offset, jint i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Inserts the string representation of the second int argument into this string buffer. | |
| jint | lastIndexOf (const ::java::lang::String &str, jint fromIndex,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the index within this string of the last occurrence of the specified substring. | |
| jint | lastIndexOf (const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the index within this string of the rightmost occurrence of the specified substring. | |
| jint | length (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the length (character count) of this string buffer. | |
| ::java::lang::StringBuffer | replace (jint start, jint end, const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Replaces the characters in a substring of this StringBuffer with characters in the specified String. | |
| ::java::lang::StringBuffer | reverse (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| The character sequence contained in this string buffer is replaced by the reverse of the sequence. | |
| void | setCharAt (jint index, jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
The character at the specified index of this string buffer is set to ch. | |
| void | setLength (jint newLength,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets the length of this String buffer. | |
| StringBuffer (::xmog_dummy _use_java_ctor,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
| Constructs a string buffer with no characters in it and an initial capacity of 16 characters. | |
| StringBuffer (const ::java::lang::String &str,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
| Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string. | |
| StringBuffer (jint length,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a string buffer with no characters in it and an initial capacity specified by the length argument. | |
A string buffer is like a , but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.
String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.
String buffers are used by the compiler to implement the binary string concatenation operator +. For example, the code:
<blockquote>
x = "a" + 4 + "c"
</blockquote>
is compiled to the equivalent of:
<blockquote>
x = new StringBuffer().append("a").append(4).append("c") .toString()
</blockquote> which creates a new string buffer (initially empty), appends the string representation of each operand to the string buffer in turn, and then converts the contents of the string buffer to a string. Overall, this avoids creating many temporary strings.
The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.
For example, if z refers to a string buffer object whose current contents are "<code>start</code>", then the method call z.append("le") would cause the string buffer to contain "<code>startle</code>", whereas z.insert(4, "le") would alter the string buffer to contain "<code>starlet</code>".
In general, if sb refers to an instance of a StringBuffer, then sb.append(x) has the same effect as sb.insert(sb.length(), x).
Every string buffer has a capacity. As long as the length of the character sequence contained in the string buffer does not exceed the capacity, it is not necessary to allocate a new internal buffer array. If the internal buffer overflows, it is automatically made larger.
|
||||||||||||||||
|
Constructs a string buffer with no characters in it and an initial capacity specified by the
|
|
||||||||||||||||
|
Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string.
The initial capacity of the string buffer is
|
|
||||||||||||||||
|
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
|
|
||||||||||||||||||||
|
Removes the characters in a substring of this
The substring begins at the specified
|
|
||||||||||||||||||||||||
|
Appends the string representation of a subarray of the
Characters of the character array
The overall effect is exactly as if the arguments were converted to a string by the method and the characters of that string were then appended to this
|
|
||||||||||||||||
|
Appends the string representation of the The characters of the array argument are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the length of the argument.
The overall effect is exactly as if the argument were converted to a string by the method and the characters of that string were then appended to this
|
|
||||||||||||||||
|
Appends the specified
The characters of the
Let n be the length of the old character sequence, the one contained in the
The method
|
|
||||||||||||||||
|
Appends the string to this string buffer.
The characters of the
Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is converted to a string as if by the method
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is converted to a string as if by the method
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is converted to a string as if by the method
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is appended to the contents of this string buffer. The length of this string buffer increases by
The overall effect is exactly as if the argument were converted to a string by the method and the character in that string were then appended to this
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is converted to a string as if by the method
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is converted to a string as if by the method
|
|
||||||||||||||||
|
Appends the string representation of the
The argument is converted to a string as if by the method
|
|
||||||||||||
|
Returns the current capacity of the String buffer. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.
|
|
||||||||||||||||
|
The specified character of the sequence currently represented by the string buffer, as indicated by the
The first character of a string buffer is at index
The index argument must be greater than or equal to
Reimplemented from java::lang::CharSequence. |
|
||||||||||||||||
|
Removes the character at the specified position in this
|
|
||||||||||||||||
|
Ensures that the capacity of the buffer is at least equal to the specified minimum. If the current capacity of this string buffer is less than the argument, then a new internal buffer is allocated with greater capacity. The new capacity is the larger of:
minimumCapacity argument is nonpositive, this method takes no action and simply returns.
|
|
||||||||||||||||||||||||||||
|
Characters are copied from this string buffer into the destination character array
The first character to be copied is at index <blockquote>
dstbegin + (srcEnd-srcBegin) - 1 </blockquote>
|
|
||||||||||||||||||||
|
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
The integer returned is the smallest value
k >= Math.min(fromIndex, str.length()) &&
this.toString().startsWith(str, k)
</blockquote> If no such value of k exists, then -1 is returned.
|
|
||||||||||||||||
|
Returns the index within this string of the first occurrence of the specified substring. The integer returned is the smallest value k such that: <blockquote>
this.toString().startsWith(str, <i>k</i>)
</blockquote> is
|
|
||||||||||||||||||||||||||||
|
Inserts the string representation of a subarray of the
The subarray begins at the specified
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The characters of the array argument are inserted into the contents of this string buffer at the position indicated by
The overall effect is exactly as if the argument were converted to a string by the method and the characters of that string were then inserted into this
|
|
||||||||||||||||||||
|
Inserts the string into this string buffer.
The characters of the The character at index k in the new character sequence is equal to:
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The second argument is converted to a string as if by the method
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The second argument is converted to a string as if by the method
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The second argument is converted to a string as if by the method
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The second argument is converted to a string as if by the method
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The second argument is inserted into the contents of this string buffer at the position indicated by
The overall effect is exactly as if the argument were converted to a string by the method and the character in that string were then inserted into this
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the
The second argument is converted to a string as if by the method
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Inserts the string representation of the second
The second argument is converted to a string as if by the method
The offset argument must be greater than or equal to
|
|
||||||||||||||||||||
|
Returns the index within this string of the last occurrence of the specified substring. The integer returned is the largest value k such that: <blockquote>
k <= Math.min(fromIndex, str.length()) &&
this.toString().startsWith(str, k)
</blockquote> If no such value of k exists, then -1 is returned.
|
|
||||||||||||||||