how to convert stringbuffer value into integer code example Example: convert stringbuffer to string in java str.toString();