title: Break a String Buffer into 80-character Chunk
body: <p>I want to create an array of string out of a StringBuffer. I need to break the buffer in every 80 characters. So first string element in the array will contain first 80 characters from the buffer, second element will contain the next 80 characters from the buffer. The buffer size may not be divisible by 80. So, the last string element of the array may have the rest which can be less than or equal to 80 characters.</p>
  
  <p>What would be the best way to do that considering that substring function of String might get an index out of bounds exception?</p>