API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. StringBuffer View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.101, 11/17/05
Serial
Hierarchy
 Object
      AbstractStringBuilder
          StringBuffer
Implements
 Serializable
 CharSequence
Subclasses
Description
publicfinal class StringBuffer
  A thread-safe, mutable sequence of characters.
See also:    StringBuilder String
Constructors
public StringBuffer ()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
public StringBuffer (CharSequence seq)
  Constructs a string buffer that contains the same characters as the specified CharSequence.
public StringBuffer (int capacity)
  Constructs a string buffer with no characters in it and the specified initial capacity.
public StringBuffer (String str)
  Constructs a string buffer initialized to the contents of the specified string.
Methods
Hide/Show inherited methods
publicsynchronized StringBuffer append (boolean b) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (char c) [Overrides AbstractStringBuilder]
publicsynchronized StringBuffer append (char[] str) [Overrides AbstractStringBuilder]
publicsynchronized StringBuffer append (char[] str, int offset, int len) [Overrides AbstractStringBuilder]
public StringBuffer append (CharSequence s) [Overrides AbstractStringBuilder]
  Appends the specified CharSequence to this sequence.
publicsynchronized StringBuffer append (CharSequence s, int start, int end) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (double d) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (float f) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (int i) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (long lng) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (Object obj) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer append (String str) [Overrides AbstractStringBuilder]
publicsynchronized StringBuffer append (StringBuffer sb) [Overrides AbstractStringBuilder]
  Appends the specified StringBuffer to this sequence.
publicsynchronized StringBuffer appendCodePoint (int codePoint) [Overrides AbstractStringBuilder]
 
publicsynchronized int capacity () [Overrides AbstractStringBuilder]
publicsynchronized char charAt (int index) [Overrides AbstractStringBuilder] [Specified in CharSequence]
 
publicsynchronized int codePointAt (int index) [Overrides AbstractStringBuilder]
 
publicsynchronized int codePointBefore (int index) [Overrides AbstractStringBuilder]
 
publicsynchronized int codePointCount (int beginIndex, int endIndex) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer delete (int start, int end) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer deleteCharAt (int index) [Overrides AbstractStringBuilder]
 
publicsynchronized void ensureCapacity (int minimumCapacity) [Overrides AbstractStringBuilder]
pack-private void expandCapacity (int minimumCapacity) [Inherited From AbstractStringBuilder]
This implements the expansion semantics of ensureCapacity with no size check or synchronization.
publicsynchronized void getChars (int srcBegin, int srcEnd, char[] dst, int dstBegin) [Overrides AbstractStringBuilder]
 
pack-privatefinal char getValue () [Inherited From AbstractStringBuilder]
Needed by String for the contentEquals method.
public int indexOf (String str) [Overrides AbstractStringBuilder]
 
publicsynchronized int indexOf (String str, int fromIndex) [Overrides AbstractStringBuilder]
 
public StringBuffer insert (int offset, boolean b) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer insert (int offset, char c) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer insert (int offset, char[] str) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer insert (int index, char[] str, int offset, int len) [Overrides AbstractStringBuilder]
 
public StringBuffer insert (int dstOffset, CharSequence s) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer insert (int dstOffset, CharSequence s, int start, int end) [Overrides AbstractStringBuilder]
 
public StringBuffer insert (int offset, double d) [Overrides AbstractStringBuilder]
 
public StringBuffer insert (int offset, float f) [Overrides AbstractStringBuilder]
 
public StringBuffer insert (int offset, int i) [Overrides AbstractStringBuilder]
 
public StringBuffer insert (int offset, long l) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer insert (int offset, Object obj) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer insert (int offset, String str) [Overrides AbstractStringBuilder]
 
public int lastIndexOf (String str) [Overrides AbstractStringBuilder]
 
publicsynchronized int lastIndexOf (String str, int fromIndex) [Overrides AbstractStringBuilder]
 
publicsynchronized int length () [Overrides AbstractStringBuilder] [Specified in CharSequence]
publicsynchronized int offsetByCodePoints (int index, int codePointOffset) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer replace (int start, int end, String str) [Overrides AbstractStringBuilder]
 
publicsynchronized StringBuffer reverse () [Overrides AbstractStringBuilder]
 
publicsynchronized void setCharAt (int index, char ch) [Overrides AbstractStringBuilder]
 
publicsynchronized void setLength (int newLength) [Overrides AbstractStringBuilder]
 
pack-privatestatic int stringSizeOfInt (int x) [Inherited From AbstractStringBuilder]
pack-privatestatic int stringSizeOfLong (long x) [Inherited From AbstractStringBuilder]
publicsynchronized CharSequence subSequence (int start, int end) [Overrides AbstractStringBuilder] [Specified in CharSequence]
 
publicsynchronized String substring (int start) [Overrides AbstractStringBuilder]
 
publicsynchronized String substring (int start, int end) [Overrides AbstractStringBuilder]
 
publicsynchronized String toString () [Specified in CharSequence]
publicsynchronized void trimToSize () [Overrides AbstractStringBuilder]
 
Fields
Hide/Show inherited fields
pack-private int count [Inherited From AbstractStringBuilder]
The count is the number of characters used.
pack-privatefinalstatic long serialVersionUID = "3388685877147921107"
use serialVersionUID from JDK 1.0.2 for interoperability
pack-privatefinalstatic int sizeTable [Inherited From AbstractStringBuilder]
pack-private char value [Inherited From AbstractStringBuilder]
The value is used for character storage.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar