storing incoming data from BT to a char string

I had problems using PaulS's while loop method at 9600 baud. Sometimes, it would only display 1 or 2 characters on each line. I think it is due to the reading rate not fast enough. This code worked for me:

char buf[51];
void setup(){
  Serial.begin(9600);
  Serial.setTimeout(100);
}
void loop(){
  Serial.readBytes(buf, 50);
  if (strlen(buf) > 0) Serial.println(buf);
  for (byte i = 0; i < 51; i++) buf[i] = NULL;
}

I used this method to control a servo from the Serial Monitor, and it works great! You might need to change the timeout. You can print a string up to 50 characters long with this code. You might also consider SerialEvent().