title: JAVA: Receive data in chunks from RFduino to Android, combine into string from start to end character.
body: <p>I hope you bright minds can help me out with a JAVA problem. I'm fairly new to programming and haven't been able to crack this through the last few days.</p>
  
  <p>I have an RFduino that sends data (byte array that i convert in to a string) like</p>
  
  <p><em>*1403263507\n300\n1750,1750,1750,1750,1775,1775,1775,1775,1775,1800,1800,1800,1800,1800\n68,68,68,68,68,67,67,67,68,68,68,68,68,68A</em>. </p>
  
  <p>This is temperature and humidity readings among some other info. The problem is that I unintentionally receive the data in chunks like </p>
  
  <p>First chunk: <em>*1403263507\n300\n1750,1750,1750,1750,</em> and </p>
  
  <p>second chunk: <em>1775,1775,1775,1775,1775,1800,1800,1800,1800,1800\n68,68,68,68,68,67,67,67,68,68,68,68,68,68A</em>. </p>
  
  <p>The sizes of these string chunks are different every time, as well as the whole string of data from * to A.  </p>
  
  <p>I've added the <em>*</em> and the <em>A</em> to be able to figure out when the whole string starts (at *) and ends (A). A chunk of data can also contain both the end and beginning of a new string like</p>
  
  <p><em>68,68,68,68,68A*1403263507\n300\n1750,</em></p>
  
  <p>So my question is:</p>
  
  <p><strong>How do i create one string that consists of the different chunks i received, starting with '*' and ending with A? And how do I complete one string and start one new if I receive the beginning and ending of two different strings like 68,68,68,68,68A*1403263507\n300\n1750,"</strong></p>
  
  <p>Thanks! All help is very much appreciated!   </p>