title: How to delimit a string to a string with certain length with Java?
body: <p>I have a very long String. And I have a function write(String str) that can only support a string with 20 chars. How can I do to cut my long string into strings of 20 chars and loop in my write() function ?</p>
  
  <p>Sorry, what I did :</p>
  
  <pre><code>for(String retval: pic.split("",20)) {
  mBluetoothLeService.writeCharacteristic(characteristic, retval)
  </code></pre>
  
  <p>pic is my long String. however doing this, It's not doing what I want</p>
  
  <p>Thank you in advance !</p>